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


 

    My problem is that the sub menus I have created in my java script tabs disappear very quickly after being clicked.

Return to Recent Questions


Q: Earlier today I bought your Deluxe Tabbed Menu software. I "nearly" have the menu I want working, but my problem is that the sub menus I have created in my java script tabs disappear very quickly after being clicked. I want these sub-menus to stay when.

The website that I have developed the menu for can be seen at www.domain.ie/index.php I have sub menus created for the About, Courses & Contact Us items, but as mentioned these disappear very quickly.

FYI, I call the data.js menu file from an include file in the webpages. I don't know if this has anything to do with my problem.

A: That is happen because you have links for the top items with subitems:
About Us
Courses
Contact Us

Actually it is not correctly to use links for items with subitems. You should use these items to open subitems only.

But if you want to use links for them you should set the correct pressed item for this page, for example for
http://www.domain.ie/about.php
you should set
var bselectedItem=2;

http://www.domain.ie/courses.php
you should set
var bselectedItem=6;

Deluxe Tabs doesn't support API functions which can return the selected tab aslo.

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>






Return to Recent Questions

Related:
Bootstrap Modal Popup Form Bootstrap Row Grid  |  Bootstrap Media queries Example  |  Bootstrap Multiselect Option  |  Bootstrap Login forms Layout  |  Bootstrap Layout Jquery  | 
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 | Website Generator AI | AI web design generator | AI website design generator | AI web page design generator