Results 1 to 3 of 3

Thread: Selected Tab for Two Level Tab Navigation

  1. #1
    Join Date
    Apr 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Selected Tab for Two Level Tab Navigation

    1) Script Title: DD Tab Menu

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/ddtabmenu.htm

    3) Describe problem: I am wondering if there is a way to rig this up so that when a user clicks a menu, and goes to that page, that tab stays highlighted and the submenu expanded.

    Or, if there is a different script that deals with this??

    Thanks,
    mark
    Last edited by marqpdx; 04-13-2007 at 10:47 PM. Reason: lame title

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

    Default

    I assume you wish to do this using JavaScript? To recap, the way to manually set the tab to be selected by default is via the line:

    Code:
    var initialtab=[1, "sc1"]
    inside the script. To do this automatically, one way I can think of is to compare the current page's URL to each tab's URL, and if a match is found, select that tab.

    I'll come up with something this weekend, and post the modified code here.

  3. #3
    Join Date
    Apr 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Selected Subtabs

    Hi,
    that's what i was thinking.

    i started down that path with:

    function collectsubtabs(){
    var subtabobj=document.getElementById("tabcontentcontainer");
    subtabobjlinks=subtabobj.getElementsByTagName("A");
    }

    it would be great to see what you come up with. will make the script much tighter!

    thanks,
    m

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
  •