Results 1 to 8 of 8

Thread: Tab Content Script

  1. #1
    Join Date
    Jan 2006
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Tab Content Script

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

    I pasted the script exactly how it is on the site demo page just to see if it works. It appears fine, but when I click on one of the tabs, it loads to another page that says "this page cannot be found".

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    PLEASE: Include the URL to your problematic webpage that you want help with.
    You may wish to change the href= attributes on the links. However, it sounds as though the problem may be deeper than that. If you do so and the problem still isn't fixed, please link to your page or paste you code (in [code] tags, please).
    Last edited by Twey; 01-23-2006 at 03:04 PM.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Jan 2006
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    http://www.geocities.com/n84889//template.html

    I changed the attribute for the "What's New" tab, but the page still reloads, that's the problem.

    BTW, I'm not clear as to what I did wrong for posting a link to the script. I thought I posted it right at the top of the message as requested.

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Eh... wrong sticky, sorry. Edited.
    You might want to make sure you have a correct DOM tree before using scripts.
    Or any DOM tree, for that matter.
    http://validator.w3.org/check?uri=ht.../template.html
    I don't know if it's possible to entirely validate that page; GeoCities' scripts might mess it up. However, you need to do at least something right in your HTML.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  5. #5
    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

    It could be Geocities script conflicts. Try changing:

    HTML Code:
    <li><a href="http://www.dynamicdrive.com" class="current" onClick="return expandcontent('sc1', this)">Dynamic Drive</a></li>
    to:

    HTML Code:
    <li><a href="http://www.dynamicdrive.com" class="current" onClick="expandcontent('sc1', this);return false;">Dynamic Drive</a></li>
    or even to:

    HTML Code:
    <li><a href="javascript:void(0);" class="current" onClick="expandcontent('sc1', this)">Dynamic Drive</a></li>
    - John
    ________________________

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

  6. #6
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    No, expandcontent() always returns false. That isn't the problem; I checked. Though it's odd; that would seem to be the problem at first glance.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  7. #7
    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

    Quote Originally Posted by Twey
    No, expandcontent() always returns false. That isn't the problem; I checked. Though it's odd; that would seem to be the problem at first glance.
    How did you check? I mean, of course I know that the function is supposed to return false. My thinking is that since, it isn't doing that on Geocities and because, otherwise the rest of the script appears to work, just finding a different way to prevent page loading onclick may be the best that can be hoped for on Geocities.
    - John
    ________________________

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

  8. #8
    Join Date
    Jan 2006
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    YEEEEEEEEEEEESSSSSSSSSSSSSSSSSS.

    The 2nd one worked. Thanks so much.

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
  •