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:33
using both swap image and popup together
Poster: amweiss
Dated: Saturday April 10 2004 - 1:22:08 BST
Hi,
I'm in the processing of evaluating this product, and I working on a website that is using a typical rollover, as this:
<a href="#" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('bookstore','','images/on_06.gif',1)"><img src="images/off_06.gif" name="bookstore"></a>
My question is can I use the above for the rollover of the main link and somehow also use Milonic for the submenus?
Here is the site I'm working on
http://www.acrwebsite.org/index4.asp
Thanks,
Allen
Poster: kevin3442
Dated: Saturday April 10 2004 - 3:39:48 BST
Hi Allen,
Try this:
Code:
<a href="#" onMouseOut="MM_swapImgRestore();popdown()" onMouseOver="MM_swapImage('bookstore','','images/on_06.gif',1);popup('menuName','bookstore')"><img src="images/off_06.gif" name="bookstore" id="bookstore"></a>
Note that I have:
(1) Added popdown() to the onmouseout event
(2) Added popup() to the onmouseover event. The first parameter passed to popup() will be the name of the menu you want to open. The second parameter is the name/id of the image where the menu will open. The upper-left corner of the menu will be at the lower-left corner of the image when the menu opens. If you want, you can add a third and fourth parameter in the call to popup(), to offset the menu's top and left coordinates. e.g.,
Code:
popup('menuName', 'imageName', 5, 10)
would move the menu 5px down and 10px to the right (use negative values for up and left).
(3) added id="bookstore". You'll want to use bothe the name and the id attgribute in your <img> tag, assigning the same value to both ("bookstore" in your example). If you don't us the id attibute, this won't work in NS. If you don't use the name attribute, it won't work in IE.
Hope that helps,
Kevin