470,849 Members | 659 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,849 developers. It's quick & easy.

DOM differences between IE/NN and Firefox

My NavBar menu code uses toElement.parentNode.id to check if the mouse has
moved to a specific parent or off the menus onto the page.

Moving off the menus, IE6 and NN8 give toElement.id as BODY so the parent
is HTML. Firefox gives toElement.id as HTML so parentNode gives an error.

It seems to me that IE and NN are correct. Is that right? A difference I
have to code around?

Thanks in anticipation.

Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
Oct 28 '05 #1
3 4784


Roger Withnell wrote:
My NavBar menu code uses toElement.parentNode.id to check if the mouse has
moved to a specific parent or off the menus onto the page.
Well toElement is not even part of the W3C DOM and I don't think Firefox
implements that. There is relatedTarget however.
Moving off the menus, IE6 and NN8 give toElement.id as BODY so the parent
is HTML. Firefox gives toElement.id as HTML so parentNode gives an error.

It seems to me that IE and NN are correct.


Why? Do you have any part of the HTML and/or CSS and/or DOM
specification to cite as to which is correct behavior?
--

Martin Honnen
http://JavaScript.FAQTs.com/
Oct 28 '05 #2

Sorry. I'm using relatedTarget for NN and toElement for IE.

Surely the parent of the div containing the menu is BODY, not HTML?

Are you saying the DOM does not specify this?

"Martin Honnen" <ma*******@yahoo.de> wrote in message
news:43***********************@newsread4.arcor-online.net...


Roger Withnell wrote:
My NavBar menu code uses toElement.parentNode.id to check if the mouse
has moved to a specific parent or off the menus onto the page.


Well toElement is not even part of the W3C DOM and I don't think Firefox
implements that. There is relatedTarget however.
Moving off the menus, IE6 and NN8 give toElement.id as BODY so the
parent is HTML. Firefox gives toElement.id as HTML so parentNode gives
an error.

It seems to me that IE and NN are correct.


Why? Do you have any part of the HTML and/or CSS and/or DOM specification
to cite as to which is correct behavior?
--

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


Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
Oct 28 '05 #3


Roger Withnell wrote:
Sorry. I'm using relatedTarget for NN and toElement for IE.

Surely the parent of the div containing the menu is BODY, not HTML?

Are you saying the DOM does not specify this?


The div might be a child of the body which is a child of the html
element. Whether you move your mouse from a child of the body to the
body or outside of the body to the html element depends on various
things like how far the body stretches, on the margins and paddings of
elements and I think on the speed of mouse movements.
With
<http://home.arcor.de/martin.honnen/javascript/2005/10/test2005102801.html>
With both IE 6 and Mozilla 1.7 I am able to rapidly move the mouse
outside of the paragraph directly to the html element (as least as far
as the event handling reports it with relatedTarget or toElement), in
particular when the body has no padding.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Oct 28 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by yawnmoth | last post: by
5 posts views Thread by Gustaf Liljegren | last post: by
4 posts views Thread by Stuart Perryman | last post: by
87 posts views Thread by expertware | last post: by
10 posts views Thread by Eric-Sebastien Lachance | last post: by
8 posts views Thread by Warren Sarle | last post: by
3 posts views Thread by Mufasa | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.