Back To Start Of Archive
Taken From The Forum: Help & Support for DHTML Menu Version 5+
Forum Topic: Click to view post
Last Updated: Saturday July 14 2012 - 06:07:26
How do I open two menus with one click?
Poster: modernpixel
Dated: Tuesday June 1 2004 - 18:39:27 BST
I want one click to open two menus - is it possible? if so, what is the javascript that I should be using in addition to the script to popup one menu:
Code:
<a href=#
onmouseover="popup('services','servicesmenu')" onmouseout=popdown()><img src="Common/images/nav_services.gif" alt="nav_services.gif" width="67" height="22" border="0" name=servicesmenu id=servicesmenu></a>
onmouseover="popup('services','servicesmenu')" onmouseout=popdown()><img src="Common/images/nav_services.gif" alt="nav_services.gif" width="67" height="22" border="0" name=servicesmenu id=servicesmenu></a>
Thanks.
Poster: kevin3442
Dated: Tuesday June 1 2004 - 20:48:18 BST
Just continue on the same path, adding another popup() to the onmouseover event handler... like so:
Code:
<a href=#
onmouseover="popup('services','servicesmenu');popup('menuName','id')" onmouseout=popdown()><img src="Common/images/nav_services.gif" alt="nav_services.gif" width="67" height="22" border="0" name=servicesmenu id=servicesmenu></a>
onmouseover="popup('services','servicesmenu');popup('menuName','id')" onmouseout=popdown()><img src="Common/images/nav_services.gif" alt="nav_services.gif" width="67" height="22" border="0" name=servicesmenu id=servicesmenu></a>
Note the semicolon between each successive function call.
Another possibility would be to write a separate function to open multiple menus, then call that function from the onmouseover event. You could even go nuts and write a function that would open any menu whose name you passed to it, and would handle any number of menus (holler if you want to take a look at that).
Hope that helps,
Kevin
Poster: Maz
Dated: Tuesday June 1 2004 - 22:38:58 BST
Hi Kevin,
Can you tell me if this works in a div?
Thanks,
maz