PDA

View Full Version : Onmouseout Acting Odd



dglover
08-15-2005, 05:22 PM
Has anyone found a way to make onMouseOut work like onMouseLeave? Do you need to cancel the bubble? If so, how?

jenifer
09-29-2005, 05:51 PM
I could really use an answer to this as well. The mouseover works fine, but onmouseout doesn't. I'm just swapping two images back and forth... should be easy, but I can't seem to figure it out. For example, this mouseout doesn't work:

<a href="" onClick="return clickreturnvalue()" onMouseout="document.ncolony.src='images/nav_colony.gif';" onMouseover="document.ncolony.src='images/nav_colony2.gif'; dropdownmenu(this, event, 'anylinkmenu1')"><img vspace=4 name="ncolony" src="images/nav_colony.gif" width="79" height="9" border="0" alt=""></a>

The onmouseover works, but not the onmouseout.

Jenifer

jenifer
09-29-2005, 07:06 PM
I guess I'm going to have to find a different menu script to use as I can't figure out the onMouseout problem. grrr. This script is great otherwise. But my client wants the mouseovers. sigh

Jenifer :(

jenifer
09-29-2005, 10:29 PM
Okay, I keep coming back to this script as it works the best out of all of the ones I've found. I tried adding my own hack to the javascript file and got closer, but not quite.

What is it that is preventing the added onMouseout in the <a> from running? Is it the setting of "dropmenuobj.onmouseout=" ?

It works great other than this tiny problem. I wish I knew Javascript a bit better. argh

Jenifer

jenifer
09-29-2005, 11:52 PM
Aha! I moved the OnMouseout event to the image itself and it works! Finally! woo-hoo! Here's what it looks like now:

<a href="" onClick="return clickreturnvalue()" onMouseover="document.ncolony.src='images/nav_colony2.gif'; dropdownmenu(this, event, 'anylinkmenu1')"><img vspace=4 name="ncolony" onMouseout="document.ncolony.src='images/nav_colony.gif'" src="images/nav_colony.gif" width="79" height="9" border="0" alt=""></a>

Jenifer