Results 1 to 3 of 3

Thread: DD Tab Menu > how to have tab stay selected

  1. #1
    Join Date
    Apr 2008
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default DD Tab Menu > how to have tab stay selected

    1) Script Title: DD Tab Menu (5 styles)

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

    3) Describe problem: How to have tab that is reflective of page (home tab with home page, etc) stay selected (visually) as user mouses over other tab choices rather than becoming unselected.

    And, if possible, have that selected tab be another color, etc, so the mouseover choices would not appear to be the same.

    I don't see in the script where I could do this and I would appreciate suggestions. Thanks

    Bob H

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

    Default

    If you mean have the menu item corresponding to the current page be selected, this really is an issue on its own. The script does let you have a certain tab selected by default when the page loads:

    Code:
    ddtabmenu.definemenu("ddtabs1", 0) //initialize Tab Menu with ID "ddtabs1" and select 1st tab by default
    As far as how to match up the current page's URL with the appropriate tab to select, it really depends on how your site is created and what's at your disposal for doing so. For example, if your site is dynamically generated, you'd use some server side coding to do the match up, then dynamically output the menu's initialization code above accordingly. But there isn't a reliable way to do the match up using JavaScript, if that's what you're asking.

  3. #3
    Join Date
    Nov 2008
    Posts
    9
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks ddadmin. That's a good clarification.

    Could you go a bit further and explain the server side scripting? I'm doing a dot net site and the menus are in a master page.

    TIA

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
  •