How can change a displayed tab selection to another one in the dynamic menu tabs
Return to Recent Questions
Q:
How can I from javascript code change a displayed tab selection
to another one in the dynamic menu tabs... lets say from first tab to the third tab?
A:
This Tabs menu can save pressed item automatically within
1 page only. If you open another page, the menu can't remember pressed
item. You should do that manually using Javascript and menu parameters
(var bselectedItem and var var bselectedSmItem) or using any server-side script (php, asp, etc.)
Deluxe Tabs doesn't support API functions which can return the
selected tab.
If your site is written on PHP you can set "bselectedItem" and "var
bselectedSmItem" parameters based on your link before
you call your data file.
For example, move "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=<?php echo $seltabs; ?>;
var bselectedSmItem=<?php echo $selsmtabs; ?>;
</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>
Try that.
Return to Recent Questions
Related:
- Sep 24, 2006 - If there is a way of establishing the width at "runtime" in the javascript dynamic menu?
- Sep 26, 2006 - Is there a way to change the height of the main buttons in my simple dhtml menu.
- Oct 03, 2006 - Do I have the ability to change colors for the menus and the sub menus in the cascade menu.
- Oct 07, 2006 - How do you change the back ground color of the javascript horizontal menus?
- Oct 13, 2006 - Under the menu images there is a gray line that makes it look broken.
- Nov 05, 2006 - The font color doesn't change when I roll over the dhtml side menu
- Nov 10, 2006 - I can't make my vertical dynamic menu work in at Dreaweaver template - why?!
- Nov 14, 2006 - Can dhtml menu script work with tables ?
- Nov 17, 2006 - Is there a way to change preview screen color of the onmouseover menu maker?
- Nov 21, 2006 - Why the javascript submenu alignment changes depending on the browser window size?
- Nov 22, 2006 - I cannot get the background color of the html popup menu to change
|