How do I highlight the current tab in a hover tab menu?
Return to Recent Questions
Q:
How do I highlight the current tab in a hover tab menu?
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 06, 2006 - The first item of the html drop down menu stays highlighted.
- Sep 16, 2006 - I need to be able to highlight the selected menu item of the html tree menu.
- Sep 24, 2006 - If there is a way of establishing the width at "runtime" in the javascript dynamic menu?
- Nov 14, 2006 - Can dhtml menu script work with tables ?
- Nov 20, 2006 - We need to have 2 javascript hover menu on one page.
- Nov 29, 2006 - Why the background images disappear for a while after hovering over html menubar?
- Nov 30, 2006 - How to select the font and backcolors in java menubar using the hexidecimal number?
- Jan 06, 2007 - Do I need to replace all the files and script in all the web pages with hover menu...?
- Jan 29, 2007 - Is this java script drop down menu floatable?
- Feb 06, 2007 - We use IFrames and Frameset. Will Deluxe-Menu and Deluxe menu tabs work for us?
- Feb 07, 2007 - Can you create/destroy tabs javascript with only client side javascript
|