image rollover in menu

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
gabi_dd
Advanced
Advanced
Posts: 10
Joined: Thu Feb 19, 2004 2:15 pm

image rollover in menu

Post by gabi_dd »

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
User avatar
kevin3442
Milonic God
Milonic God
Posts: 2460
Joined: Sat Sep 07, 2002 12:09 am
Location: Lincoln, NE
Contact:

Post by kevin3442 »

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: Select all

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
Post Reply