Can someone point me in the right direction to have the correct tab selected in the css tab menu..
Return to Recent Questions
Q:
I have setup some tabs on a site that I am designing and for some
reason when i click on a tab and it links to another page it
automatically highlights the first tab in the row. � I have tried
fiddling with it and have not been able to figure it out.�
Can someone point me in the right direction to have the correct tab
selected in the css tab menu after i click it and goto the page.
A:
Deluxe Tabs doesn't support API functions which can return the
selected tab.
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=<?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>
</span>
Return to Recent Questions
Related:
- 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?
- Oct 15, 2006 - Submenus doesn't position correctly in my javascript template.
- Oct 22, 2006 - Why I now have double drag menus and how to correct?
- Oct 31, 2006 - Is it possible to use the AXAJ-Like technology and Javascript-API in css pop up menu?
- Nov 07, 2006 - The menu appears perfectly in the css menu maker preview screen, but not on the page.
- Nov 14, 2006 - Can dhtml menu script work with tables ?
- Nov 24, 2006 - How do I make the css submenu appear over the adjoining frame?
- Dec 09, 2006 - Is it possible to have css drop down menu items act like regular hyperlinks?
- Dec 12, 2006 - I want that menu css recognize when user has moused off the menu, and then disappear.
- Dec 18, 2006 - The autoscroll doesn�t seem to work with the css positioning though in menu onMouseOver.
|