HighDots Forums  

Re: onMouseOut triggering from a DIV element

Javascript JavaScript language (comp.lang.javascript)


Discuss Re: onMouseOut triggering from a DIV element in the Javascript forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Robert Mark Bram
 
Posts: n/a

Default Re: onMouseOut triggering from a DIV element - 08-03-2003 , 08:15 AM






Thank you Martin!

Quote:
Check
http://www.faqts.com/knowledge_base/...d/1606/fid/145
for details on this problem and a solution
I am working on this now, but it is so ugly to have to check whether we are
in Netscape or IE in order to test whether the event's trigger is the same
as the div element or not.

Am I correct in assuming that the only reason for this code is because IE
supports event.fromElement while Netscape supports event.relatedTarget?
Because otherwise, code to test whether one element is a child of another
element is fairly easy.

Rob





Reply With Quote
  #2  
Old   
Martin Honnen
 
Posts: n/a

Default Re: onMouseOut triggering from a DIV element - 08-03-2003 , 09:33 AM








Robert Mark Bram wrote:
Quote:
Thank you Martin!


Check
http://www.faqts.com/knowledge_base/...d/1606/fid/145
for details on this problem and a solution


I am working on this now, but it is so ugly to have to check whether we are
in Netscape or IE in order to test whether the event's trigger is the same
as the div element or not.

Am I correct in assuming that the only reason for this code is because IE
supports event.fromElement while Netscape supports event.relatedTarget?
Because otherwise, code to test whether one element is a child of another
element is fairly easy.
Admittedly if you would check in every event handler then its ugly but
of course you can write a function to wrap the check. I have updated the
FAQTs entry to do so
http://www.faqts.com/knowledge_base/view.phtml/aid/1606



--

Martin Honnen
http://JavaScript.FAQTs.com/



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.