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:
- Aug 30, 2006 - Can all the java script be contained with in the html and not use an external .js file?
- Sep 02, 2006 - Can I show / hide the javascript floating menu .
- Sep 06, 2006 - The Items of the javascript tree view stay expanded in the same state.
- Sep 06, 2006 - Can't see my javascript vertical tree menu in FireFox.
- Sep 11, 2006 - If I use doctype the settings of the submenus in javascript dropdown menu get lost.
- Sep 15, 2006 - Are vertical menus also supported? I don't see any in the javascript menu examples.
- Sep 17, 2006 - How can your javascript onmouseover menu be set to open by click?
- Sep 18, 2006 - The submenus of the cross frame menu are offset by about 100 pixels to the right.
- Sep 22, 2006 - How to call the function in my java script menu?
- Sep 23, 2006 - Is it possible that javascript drop down menus doesn't put anything on the local computer?
- Sep 23, 2006 - Is it possible that your menu call some javascript onmouseover event?
|