menu drop down by Deluxe-Menu.com

DHTML Faq » Is there a way to programmatically specify which tab is selected in the vertical menu?

Is there a way to programmatically specify which tab is selected in the vertical menu?

Filed under: Recent Posts — Tags: , , , — admin @ June 19, 2009 at 3:35 pm

Q:

Is there a way to programmatically specify which tab is selected in the vertical menu?

What I mean is, I want to set the selected tab programmatically (Not clicking the tab).

A:

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>

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment