[Javascript] ONMOUSEOUT being triggered too many times

Lau lau at goldenweb.com.au
Tue Aug 14 04:05:48 CDT 2001


Hi all,

How do I get around this problem?
I have a DIV with a TABLE in it that I'm using as a popup menu.
Its initially HIDDEN and becomes VISIBLE when the cursor moves over a link.
So when the mouse leaves the DIV I want the menu to become HIDDEN again.
Sounds easy but the problem is that I'm getting the ONMOUSEOUT event being triggered when the cursor
moves from one table row to the next, followed by another ONMOUSEOVER as it enters the next row.

Here's sample code demonstrating the problem:

<DIV ID=menu STYLE='position: absolute; left: 200px; top: 300px;visibility: visible'
onmouseover='alert("in");' onmouseout='alert("out");'>
<TABLE WIDTH=120 BORDER=1 CELLPADDING=0 CELLSPACING=0>
<TR><TD>option1</TD></TR>
<TR><TD>option2</TD></TR>
</TABLE>
</DIV>


regards
Lau


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.evolt.org/pipermail/javascript/attachments/20010814/9e638e43/attachment.htm>


More information about the Javascript mailing list