Results 1 to 4 of 4

Thread: Tab Content Script

  1. #1
    Join Date
    Aug 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Wink Tab Content Script wants to go to another page

    Site newbie here.

    http://www.dynamicdrive.com/dynamici...tabcontent.htm

    I saw this script and realized it is exactly what i want for a web app i'm working on. The code is making it want to go to another page though, and I am very confused about that! I thought this script was designed NOT to have to do that?


    <li><a href="http://www.dynamicdrive.com" class="current" onClick="return expandcontent('sc1', this)">Dynamic Drive</a></li>
    <li><a href="new.htm" onClick="return expandcontent('sc2', this)" theme="#EAEAFF">What's New</a></li>
    <li><a href="hot.htm" onClick="return expandcontent('sc3', this)" theme="#FFE6E6">What's Hot</a></li>
    <li><a href="search.htm" onClick="return expandcontent('sc4', this)" theme="#DFFFDF">Search</a></li>

    How do I alter these lines so that it ONLY displays sc1, sc2, etc and not trying to go to new.htm, hot.htm, etc?

    thanks for any help.
    Last edited by roninhockley; 08-13-2005 at 09:18 PM. Reason: conform to form rules

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    The demo does exactly that in my Mozilla and IE browsers. Are you having trouble with the demo or with your own version?
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Aug 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Demo works fine for me too, just my own version doing this. I changed the anchor tag in the ul's from an href to an onclick...it fixed it except that it now isn't an underlined hyperlink.

    But i'm still really puzzled why it was built with an href pointing to another page in the first place. I mean it works great on here, but why point to a dead page?

    Before I rant any further, this site is a great find...i'm not complaining!! I'd be a dead duck without the likes of those who run this site.

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    I think I need to see the code as you have it written, or want it written, at least for that part of it. Something like:
    HTML Code:
    <a href="javascript:void(0)" onClick="return expandcontent('sc2', this)" theme="#EAEAFF">What's New</a>
    should work though.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •