Results 1 to 5 of 5

Thread: Tab Content Script

  1. #1
    Join Date
    Nov 2004
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Tab Content Script

    Hi! I'm having a little problem with your Tab Content Script (http://www.dynamicdrive.com/dynamici...tabcontent.htm).

    I'd like to know if there is any way for the script to skip it's load procedure if there are no tabs to load instead of giving out the error: " 'null' is null or not an object "?

    Only IE users are affected by this. Firefox users will not see any errors.

    Please help me out.

    Thanks!
    Last edited by SEP800; 12-14-2004 at 08:09 PM. Reason: Simplifying the problem.

  2. #2
    Join Date
    Nov 2004
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Anyone?

    I'd really appreciate it. Please.

  3. #3
    Join Date
    Nov 2004
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Someone please help me. I've looked everywhere.

  4. #4
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Hi:
    Not a problem. Just add the below code as the first lines inside function do_onload():

    Code:
    function do_onload(){
    if (!document.getElementById("tablist") || !document.getElementById("tabcontentcontainer"))
    return
    var cookiecheck=window.get_cookie && get_cookie(window.location.pathname).indexOf("|")!=-1
    The above code assumes that you've removed either the master <ul> tag or <div> tag to remove the tabs.

  5. #5
    Join Date
    Nov 2004
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thank you!

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
  •