I am trying to set a default tab in the div tab menu to be selected when a window opens...
Return to Recent Questions
Q:
I am getting stuck with trying to set a default tab in the div tab menu to be selected when a window opens...
What I've been trying to do is changing this line here :
var bselectedItem=0;
At 0 (default) it has the first tab selected. Any other number and no
tabs are selected.
Is there a setting somewhere else that I am missing?
A:
You can set "bselectedItem" and "var bselectedSmItem" parameters based on your link before you call your data file.
For example, move "var bselectedItem" and "var bselectedSmItem" parameters from your data file to your code.
<TD vAlign=top align=left>
/* Select Tab */
<script type="text/javascript" language="JavaScript1.2">
var bselectedItem= var bselectedSmItem= </script>
<SCRIPT src="data.js" type=text/javascript></SCRIPT>
</TD>
You should define seltabs and selsmtabs using server side script.
You can also set it on every page before you call data.js file, for example:
<TD vAlign=top align=left>
/* Select Tab */
<script type="text/javascript" language="JavaScript1.2">
var bselectedItem=4;
var bselectedSmItem=3;
</script>
<SCRIPT src="data.js" type=text/javascript></SCRIPT>
</TD&tg;
Return to Recent Questions
Related:
- Sep 11, 2006 - If I use doctype the settings of the submenus in javascript dropdown menu get lost.
- Sep 16, 2006 - I need to be able to highlight the selected menu item of the html tree menu.
- Sep 17, 2006 - How can your javascript onmouseover menu be set to open by click?
- Sep 18, 2006 - The submenus of the cross frame menu are offset by about 100 pixels to the right.
- Sep 24, 2006 - If there is a way of establishing the width at "runtime" in the javascript dynamic menu?
- Oct 15, 2006 - There's some problems when we use two javascript horizontal menus.
- Nov 10, 2006 - I want to set the status bar messages to another than the link text from the xp menu items?
- Nov 12, 2006 - Where in the java menu creator would I inseart the icons for individual item labels
- Nov 12, 2006 - Is this menu bar code compatible under Linux?
- Nov 14, 2006 - Can dhtml menu script work with tables ?
- Dec 01, 2006 - Is there any way to have a cursor in a slide menu so it only becomes a pointer for a link?
|