473,386 Members | 1,795 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

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 18240
> 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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Pavils Jurjans | last post by:
Hallo, I have entered some event handling hell... I want to mimic the functionality of IE5.5 onmouseenter and onmouseleave events, using DOM-standard onmouseover and onmouseout events. The...
4
by: Stuart Perryman | last post by:
Hi, I have the following code which works just fine in IE6 but not in Firefox. It is an extract of several table rows each with an individual form. It is generated by php. <form...
2
by: Colin McGuire | last post by:
Hi, I have a child form - when the mouse is over the button on the parent form, I show the child form. When the mouse cursor is moved away from the button, I hide the child form. My child form...
3
by: Colin McGuire | last post by:
Hi again NG, this question follows from a similar question that I have thought through a bit more, and the next problem I encountered :( Here is the issue clearly: if I have form1 with a button...
7
by: Coder | last post by:
Hi I have the following code in java script, it is not giving proper output in FIREFOX but running fine in IE... can anybody help me out to make this run in FIREFOX . <script...
2
by: Thevercad | last post by:
i had come across a problem trying to find an equivalent for onmouseleave for the netscape browser. I happened to find a thread in here, discussing the same problem, but with no solutions in the end....
1
by: Carod | last post by:
Hi, I have a div which scrolls out onmouseover and in onmouseleave. Within the div, there's another div containing the text. Within the text there's a link, which when rolled over triggers the...
5
by: jaysonnward | last post by:
Hello All: I've recently been recreating some 'dropdown menus' for a website I manage. I'm writing all my event handlers into my .js file. I've got the coding to work in Firefox, but the...
1
by: dipalichavan82 | last post by:
I am working on sharepont application. In a webpart , i have a grid.I want, when i right click on , grid cell, a popup comes(div). it has three items, on click of which particular links open. When i...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.