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:42
image rollover in menu
Poster: gabi_dd
Dated: Thursday February 19 2004 - 13:19:51 GMT
hi,
I have a image and a javascript-function in my menu:
aI("image=bilder/ihrhaus.off.gif; name=ihrhaus;onfunction=imgOn('ihrhaus');offfunction=imgOff('ihrhaus');showmenu=Ihr Haus;");
The image must switch by mouseover - but i can't give a name for this image (... image=bilder/ihrhaus.off.gif name='max' ...).
Can you help me?
thx
gabi
Poster: kevin3442
Dated: Thursday February 19 2004 - 16:57:24 GMT
Hi Gabi,
You' notice in the list of item properties that there is no name property in a menu item definition. That's why your rollover functions aren't working. The menu has built-in properties to handle rollover effects, so that you don't have to code them manually. For the sake of illustration, from your example I assume that your two images are named "ihrhaus.off.gif" for the mouse off state and and "ihrhaus.on.gif" for the mouse on state. Your menu item would be:
Code:
aI("image=bilder/ihrhaus.off.gif;overimage=bilder/ihrhaus.on.gif;showmenu=Ihr Haus;");
That's it. You might want to have a look at the image-based menu samples, particularly sample 17. That one does exactly the rollover effect that you're trying to get.
Hope that helps,
Kevin