View Full Version : switch menu problem
1) Script Title: switch menu
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex1/switchmenu.htm
3) Describe problem:
great menu! But, when i click any link in the script, the sub-menu closes automatically.
Is it possible to change the code, that the menu stays open until i go to the next sub-menu?
Thx and bye
Frank :-)
ddadmin
04-09-2008, 08:20 PM
Right now clicking on links within a Switch Menu doesn't cause the header itself to contract- only clicking on the header itself does this. Or do you mean when the user clicks on a link and goes to the target page, the same menu on the target page has the corresponding header contracted?
Right now clicking on links within a Switch Menu doesn't cause the header itself to contract- only clicking on the header itself does this. Or do you mean when the user clicks on a link and goes to the target page, the same menu on the target page has the corresponding header contracted?
Hi there,
i mean, when the user clicks on a submenu-button, he goes to the related page, and then the categorie close. I think it should be open.....
you can see what i mean at www.licomet.com
thx, Frank
ddadmin
04-10-2008, 07:56 PM
Make sure your menu items' ids start at sub1. Right now you're starting at sub2 instead:
<div onclick="SwitchMenu('sub2')" class="menutitle"><img width="11" height="11" src="images/sommaire/circle-0.gif" alt=""> About Licomet
</div> <span id="sub2" class="submenu"> <img src="themes/mx-Underground/images/dot.gif" alt=""> <a href="modules.php?name=profile">Company profile</a><br > <img src="themes/mx-Underground/images/dot.gif" alt=""> <a href="modules.php?name=experiences">Competence/Experiences<br > </a> </span>
<div onclick="SwitchMenu('sub3')" class="menutitle"><img width="11" height="11" src="images/sommaire/circle-0.gif" alt=""> Light measurements
</div> <span id="sub3" class="submenu"> <img src="themes/mx-Underground/images/dot.gif" alt=""> <a href="modules.php?name=lm-overview">Overview</a><br > <img src="themes/mx-Underground/images/dot.gif" alt=""> <a href="modules.php?name=lm-simulation">Modeling/Simulations</a><br > <img src="themes/mx-Underground/images/dot.gif" alt=""> <a href="modules.php?name=typesofmeasurement">Types of measurement</a><br > <img src="themes/mx-Underground/images/dot.gif" alt=""> <a href="modules.php?name=lightsources">Light Sources</a><br > <img src="themes/mx-Underground/images/dot.gif" alt=""> <a href="modules.php?name=lightdevices">Devices</a><br > <img src="themes/mx-Underground/images/dot.gif" alt=""> <a href="modules.php?name=lightprotocols">Protocols<br > </a> </span>
<div onclick="SwitchMenu('sub4')" class="menutitle"><img width="11" height="11" src="images/sommaire/circle-0.gif" alt=""> Environmental measurements
</div> <span id="sub4" class="submenu"> <img src="themes/mx-Underground/images/dot.gif" alt=""> <a href="modules.php?name=environmental">Simulation</a><br > </span>
<div onclick="SwitchMenu('sub5')" class="menutitle"><img width="11" height="11" src="images/sommaire/circle-0.gif" alt=""> Electrical measurements
</div> <span id="sub5" class="submenu"> <img src="themes/mx-Underground/images/dot.gif" alt=""> <a href="modules.php?name=ccfl">CCFL</a><br > </span>
<div onclick="SwitchMenu('sub6')" class="menutitle"><img width="11" height="11" src="images/sommaire/circle-0.gif" alt=""> Contact
</div> <span id="sub6" class="submenu"> <img src="themes/mx-Underground/images/dot.gif" alt=""> <a href="modules.php?name=i-market">International market</a><br > <img src="themes/mx-Underground/images/dot.gif" alt=""> <a href="modules.php?name=domestic">Domestic market</a><br > <img src="themes/mx-Underground/images/dot.gif" alt=""> <a href="modules.php?name=feedback">Contact</a><br > <img src="themes/mx-Underground/images/dot.gif" alt=""> <a href="modules.php?name=sitemap">Sitemap</a><br > </span>
</div> </div>
BTW, please note that your page is currently in violation of our usage terms, since the credit notice doesn't appear inline on the page. Please reinstate the credit notice: http://www.dynamicdrive.com/notice.htm
Hi,
thanks for your help. Works great now!
Sry, copyright is includet now.
Kind regards
Frank
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.