469,336 Members | 5,385 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

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

onmouseleave Firefox equivalent

I have a very simple "hover menu", which you can see at:

http://s161149005.onlinehome.us/DEMO...in/default.htm

Once you "pop it up", I want it to disappear if you mouse away from it
without clicking anything. It works using "onmouseleave" in IE.

I need it to work in Firefox!

Can someone show me a way to do this?

Thanks,
Ann

Jun 16 '06 #1
9 18028
> Once you "pop it up", I want it to disappear if you mouse away from it
without clicking anything. It works using "onmouseleave" in IE.

I need it to work in Firefox!

Can someone show me a way to do this?


I believe "onmouseexit()" should work on both IE and FireFox.

Aaron
Jun 16 '06 #2

Aaron Gray wrote:
Once you "pop it up", I want it to disappear if you mouse away from it
without clicking anything. It works using "onmouseleave" in IE.

I need it to work in Firefox!

Can someone show me a way to do this?


I believe "onmouseexit()" should work on both IE and FireFox.

Aaron


Hmm.. I substituted

<div onmouseleave="hide_Action_Menu(1)">

with

<div onMouseExit="hide_Action_Menu(1)">

and it didn't work... But I will do a search and see if I got the
syntax right... maybe I have to "bind" it differently?

Ann

Jun 16 '06 #3

Giggle Girl wrote:
Aaron Gray wrote:
Once you "pop it up", I want it to disappear if you mouse away from it
without clicking anything. It works using "onmouseleave" in IE.

I need it to work in Firefox!

Can someone show me a way to do this?


I think you want onmouseout.

Peter

Jun 16 '06 #4

pe**********@gmail.com wrote:
Giggle Girl wrote:
Aaron Gray wrote:
> Once you "pop it up", I want it to disappear if you mouse away from it
> without clicking anything. It works using "onmouseleave" in IE.
>
> I need it to work in Firefox!
>
> Can someone show me a way to do this?


I think you want onmouseout.

Peter


Onmouseout doesn't work at all.

When it encounters a contained div or table, it fires, so it totally
fails for my purposes. Thanks for the thought, though. I did try it
when I was making this thing before posting...

Ann

Jun 16 '06 #5

Giggle Girl wrote:
Onmouseout doesn't work at all.
From your description below it sounds like it does indeed work. onmouseleave, along with onmouseenter, are a non-standard events
introduced by Microsoft into IE. Firefox and other browsers will
likely never impelement them. onmouseover and onmouseout are the
events you will have to work with for this to be cross-browser
compatible. Quirksmode offers a nice overview of these standard and
non-standard events: http://www.quirksmode.org/js/events_compinfo.html
When it encounters a contained div or table, it fires, so it totally
fails for my purposes...

You have to cancel bubbling/propagation of the event based on what
element is the source of the event. A recent thread from this group
should help you with this:
http://groups.google.com/group/comp....ubbling&rnum=1

Jun 17 '06 #6

Giggle Girl wrote:
pe**********@gmail.com wrote:
Giggle Girl wrote:
Aaron Gray wrote:
> > Once you "pop it up", I want it to disappear if you mouse away from it
> > without clicking anything. It works using "onmouseleave" in IE.
> >
> > I need it to work in Firefox!
> >
> > Can someone show me a way to do this?
>
I think you want onmouseout.

Peter


Onmouseout doesn't work at all.


I think it should.
When it encounters a contained div or table, it fires, so it totally
fails for my purposes. Thanks for the thought, though. I did try it
when I was making this thing before posting...


Post a very small example that shows the problem. Then maybe someone
can see what is wrong.

Peter

Jun 17 '06 #7


Giggle Girl wrote:
I have a very simple "hover menu", which you can see at:

http://s161149005.onlinehome.us/DEMO...in/default.htm

Once you "pop it up", I want it to disappear if you mouse away from it
without clicking anything. It works using "onmouseleave" in IE.

I need it to work in Firefox!


See
<http://www.faqts.com/knowledge_base/view.phtml/aid/1606/fid/145>, you
can use mouseout/over events, you only need to check
event.toElement/fromElement respectively event.relatedTarget

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jun 17 '06 #8

Justin McConnell wrote:
From your description below it sounds like it does indeed work.

onmouseleave, along with onmouseenter, are a non-standard events
introduced by Microsoft into IE. Firefox and other browsers will
likely never impelement them.


It looks like Safari has

http://developer.apple.com/documenta...agAndDrop.html

If Firefox adds these then perhaps these events will be viewed as
semi-standard like innerHTML.

Peter

Jun 17 '06 #9

Martin Honnen wrote:
Giggle Girl wrote:
I have a very simple "hover menu", which you can see at:

http://s161149005.onlinehome.us/DEMO...in/default.htm

Once you "pop it up", I want it to disappear if you mouse away from it
without clicking anything. It works using "onmouseleave" in IE.

I need it to work in Firefox!


See
<http://www.faqts.com/knowledge_base/view.phtml/aid/1606/fid/145>, you
can use mouseout/over events, you only need to check
event.toElement/fromElement respectively event.relatedTarget

--

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


Thanks for the help and suggestions/links everyone.

I am investigating this issue based on the feedback here. (I just wish
it was as simple in Firefox as it is in IE, but such is life...)

Ann

Jun 19 '06 #10

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Pavils Jurjans | last post: by
4 posts views Thread by Stuart Perryman | last post: by
2 posts views Thread by Colin McGuire | last post: by
3 posts views Thread by Colin McGuire | last post: by
7 posts views Thread by Coder | last post: by
5 posts views Thread by jaysonnward | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by haryvincent176 | last post: by
reply views Thread by Marylou17 | last post: by
1 post views Thread by Marylou17 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.