(c) 2016, Deluxe-Menu.com
Search  
Ctrl+F2 - enter/switch menu | Arrow keys - navigate | Esc - exit menu  
  Support
  FAQ
  Contacts
  About Us
  Recent Questions


 

    Is there a way to programmatically specify which tab is selected in the drop down menu using javascript?

Return to Recent Questions


Q: Is there a way to programmatically specify which tab is selected in the drop down menu using javascript?

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>






Return to Recent Questions

Related:
Best Website Builder for Digital Marketing Agencies, Travel Agencies, Interior Designs Website Builder for Churches, Authors, Consultants, Magazines  |  Best Website Builder for Education, Software Companies, Designers, Videos  |  Best AI Website Builder - Create Website Design with AI  |  Website Builder for Online Stores, Restaurants, Musicians, Real Estate  |  Website Builder for Beginners, Bloggers, Writers, IT Companies  | 
Copyright (c) 2019, Deluxe-Menu.com
Home  |  Product Info  |  Samples  |  Download  |  Purchase  |  FAQ  |  Site Map  |  Terms of Use  |  Write Us
All rights reserved. Free AI Website Builder | Free AI Website Builder | Website Generator AI | AI web design generator | AI web page design generator