By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,497 Members | 1,287 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,497 IT Pros & Developers. It's quick & easy.

"<div>" events problem in firing in FireFox

Basharat
P: 5
Hi all
I have problem on firing "onmouseleave" event of <div> html element.
Here is the code im using:
<div ID="BSHelpPanel" class="PageMenuMain" onclick="javascript:this.style.display='none';" runat="server" >

its working fine in IE while some other events too are not firing in firefox
like
ondeactivate
onfocusout
etc.

thanks in advance
Basharat
Jul 12 '07 #1
Share this Question
Share on Google+
9 Replies


Basharat
P: 5
its urgent plz reply asap
thx
Basharat
Jul 12 '07 #2

gits
Expert Mod 5K+
P: 5,390
Hi all
I have problem on firing "onmouseleave" event of <div> html element.
Here is the code im using:
<div ID="BSHelpPanel" class="PageMenuMain" onclick="javascript:this.style.display='none';" runat="server" >

its working fine in IE while some other events too are not firing in firefox
like
ondeactivate
onfocusout
etc.

thanks in advance
Basharat
hi ...

that are no standard-event-handlers:

onmouseleave -> onmouseout
ondeactivate ?? what should that do?
onfocusout -> onblur

use the correct event-handlers

kind regards
Jul 12 '07 #3

Basharat
P: 5
these events exists. please refer to.
http://msdn2.microsoft.com/en-us/library/ms535240.aspx#

Secondly they are working fine in IE as prescribed in msdn.

if i consider your piont.
what event should i use for hiding a div once mouse leaves the div.
remeber "onmouseout" doesnt work cuz the div contains child controls and when mouse comes over child controls(buttons) the "onmouseout" of div fires too which i dont want too.

waiting for the reply.
regards,
Basharat
Jul 12 '07 #4

gits
Expert Mod 5K+
P: 5,390
i said that they are not 'STANDARD'-event-handlers (in words of standard-compliant) ... when you use IE you are using jscript ... and in case you already know where you find the documentation ... then you may refer for yourself ... trying to find out what standards compliant browsers do with that IE-specifics ... you will never find out on msdn ... except you need IE-specific information ...

those events are not used by any other browser ... and so your code will not work ...
Jul 12 '07 #5

Basharat
P: 5
well ok
but what can be the possible solution to my problem??
is there no STANDARD event firing on mouse leaving from div??
regards,
Jul 12 '07 #6

gits
Expert Mod 5K+
P: 5,390
i think ... you may use a seldefined mouseleave-function that you call on mouseout ... it retrieves the mousepos and when it is inside the div you avoid things that you only want to be done when you get out of the div ...

kind regards
Jul 12 '07 #7

drhowarddrfine
Expert 5K+
P: 7,435
well ok
but what can be the possible solution to my problem??
is there no STANDARD event firing on mouse leaving from div??
regards,
Use standard javascript, as stated. Don't refer to Microsoft documentation if you want your code to work in all browsers.
Jul 12 '07 #8

Basharat
P: 5
I understand that.
but is there any solution to my problem in standard javascript.
I want to hide a DIV on mouseout .
Please reply with the solution in standard javascript
regards
Jul 13 '07 #9

gits
Expert Mod 5K+
P: 5,390
you may have a look at the following link:

Mouse Events

kind regards
Jul 13 '07 #10

Post your reply

Sign in to post your reply or Sign up for a free account.