|
|
Is it possible to change which tab is selected in javascript dynamic menu
Return to Recent Questions
Q:
Hi, just a quick question, is it possible to change which tab is
displayed when the page is first rendered.
For instance, if you have 4 tabs, going right to left, can you
load the javascript dynamic menu with the second tab being displayed first?
A:
See, if you use Tab Mode
var tabMode = 1;
var bselectedItem = 0; //main items
var bselectedSmItem = -1; //submenus
If you use
var tabMode = 0;
var bselectedItem = 0;
See, the ID of the item starts with 0.
So, if you use TabMode (var tabMode=1;):
var bselectedItem = 4;
["-", ] - separator, ID = 0
["Mac Tab 1", "content1"], ID = 1
["Subitem1","testlink.html",] ID = 2
["Subitem2","testlink.html",] ID = 3
["Mac Tab 2", "content2"], ID = 4 // selected tab
["Subitem1","testlink.html",] ID = 5
["Subitem2","testlink.html",] ID = 6
["Mac Tab 3", "content3"], ID = 7
["Subitem1","testlink.html",] ID = 8
["Subitem2","testlink.html",] ID = 9
["Mac Tab 4", "content4"], ID = 10
["Subitem1","testlink.html",] ID = 11
["Subitem2","testlink.html",] ID = 12
If you use tabs (var tabMode=0;):
var bselectedItem = 2;
["-", ] - separator, ID = 0
["Mac Tab 1", "content1"], ID = 1
["Mac Tab 2", "content2"], ID = 2 // selected tab
["Mac Tab 3", "content3"], ID = 3
["Mac Tab 4", "content4"], ID = 4
Return to Recent Questions
Related:
- March 21, 2009 - How can we increase the width of the vista style buttons of javascript dynamic menu?
- Apr 07, 2009 - I want to get my text within a single javascript dynamic menu item to be on a two lines...
- Apr 25, 2009 - The javascript dynamic menu looks differently in IE 6 and Firefox...
- May 04, 2009 - Which file(s) I should change to change the content of each dhtml menu vertical tab?
- May 12, 2009 - Is there a way to set a parameter such that when a javascript dynamic menu Item is CLICKED...
- May 29, 2009 - Does javascript dynamic menu have support for Chinese or other Unicode characters?
- Jun 15, 2009 - I wonder how I can reduce the width of the tree javascript dynamic menu?
- Jul 03, 2009 - Could you please help me with an alignment issue with my javascript dynamic menu?
- Jul 20, 2009 - How to get javascript dynamic menu to swap images to act like a traditional image rollover.
- Aug 06, 2009 - With the licensed .js files of javascript dynamic menu the status bar on IE start shows "Error on page".
- Aug 23, 2009 - When I roll over the javascript dynamic menu the font color doesn't change
|