<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
<META content="MSHTML 5.00.3103.1000" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN class=878085100-15082001>That
code isn't quite right, sorry;</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN
class=878085100-15082001></SPAN></FONT> </DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN class=878085100-15082001>What
you need to do is add the cancel code to your event handler, as in
</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN
class=878085100-15082001></SPAN></FONT> </DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN
class=878085100-15082001>onmouseover="doFunction(); event.cancelBubble = true;"
</SPAN></FONT></DIV>
<DIV> </DIV>
<P><FONT color=#000000 face=Tahoma size=2>Rohan Parkes</FONT> </P>
<P><BR><FONT face=Tahoma size=2>-----Original Message-----<BR><B>From:</B>
Parkes, Rohan [mailto:parkesr1@anz.com]<BR><B>Sent:</B> 15 August 2001
10:47<BR><B>To:</B> 'javascript@LaTech.edu'<BR><B>Subject:</B> RE: [Javascript]
ONMOUSEOUT being triggered too many times<BR><BR></P>
<BLOCKQUOTE style="MARGIN-RIGHT: 0px"></FONT>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN
class=390424200-15082001>What's wrong is that you have the event-handler at
the top of an element tree. You have to take into account the event-bubbling
behaviour of IE - events bubble up from lower elements to higher ones.
Consequently, the table elements generate their own events, which are cpatured
by the onmoueout in the top DIV.</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN
class=390424200-15082001></SPAN></FONT> </DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN
class=390424200-15082001>Unfortunately, you can't turn event-bubbling off at
the top level, as you can in NS (one of NS's very few advantages over IE).
Instead, you have to add an attribute to each lower element whose event bubble
you want to disable:</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN
class=390424200-15082001></SPAN></FONT> </DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN
class=390424200-15082001>event.cancelBubble="true"</SPAN></FONT></DIV>
<DIV> </DIV>
<P><FONT color=#000000 face=Tahoma size=2>Rohan Parkes</FONT> </P>
<P><BR><FONT face=Tahoma size=2>-----Original Message-----<BR><B>From:</B> Lau
[mailto:lau@goldenweb.com.au]<BR><B>Sent:</B> 14 August 2001
19:06<BR><B>To:</B> javascript@LaTech.edu<BR><B>Subject:</B> [Javascript]
ONMOUSEOUT being triggered too many times<BR><BR></P>
<BLOCKQUOTE style="MARGIN-RIGHT: 0px"></FONT>
<DIV><FONT face=Arial size=2>Hi all,<BR><BR>How do I get around this
problem?<BR>I have a DIV with a TABLE in it that I'm using as a popup
menu.<BR>Its initially HIDDEN and becomes VISIBLE when the cursor moves over
a link.<BR>So when the mouse leaves the DIV I want the menu to become HIDDEN
again.<BR>Sounds easy but the problem is that I'm getting the ONMOUSEOUT
event being triggered when the cursor<BR>moves from one table row to the
next, followed by another ONMOUSEOVER as it enters the next
row.<BR><BR>Here's sample code demonstrating the problem:<BR><BR><DIV
ID=menu STYLE='position: absolute; left: 200px; top: 300px;visibility:
visible'<BR>onmouseover='alert("in");'
onmouseout='alert("out");'><BR><TABLE WIDTH=120 BORDER=1 CELLPADDING=0
CELLSPACING=0><BR><TR><TD>option1</TD></TR><BR><TR><TD>option2</TD></TR><BR></TABLE><BR></DIV><BR><BR><BR>regards<BR>Lau<BR><BR></FONT></DIV></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>