[Javascript] Need help with IE events - FIXED

Troy III Ajnej trojani2000 at hotmail.com
Tue Jul 12 13:01:08 CDT 2005


Yes the mousedown event will get fired imediatly when the mousebutton is 
pressed and you will not be able to escape from it being executed, while the 
click event will get fired only after the press and the release over the 
same element has ocurred. That means that for some reason, if you've 
mousedowned over some element but you've decided not to finish your click on 
that element, you can move away from this click element while holding 
mousebutton and release it outside, so the event never gets fired. That's 
why tere are mousedown and click event kept it the collection. Because even 
if they are very similar they act rather differently.

>From: "Mike Dougherty" <mdougherty at pbp.com>
>Reply-To: "\[JavaScript List\]" <javascript at LaTech.edu>
>To: "\[JavaScript List\]" <javascript at LaTech.edu>
>Subject: Re: [Javascript] Need help with IE events - FIXED
>Date: Tue, 12 Jul 2005 13:54:25 -0400
>
>I was using onmouseover to set focus (and update window.status) just to see 
>what was going on.
>
>I was chasing an event problem when I should have been addressing a layout 
>issue.
>
>Do you think the user even notices the difference between a click and a 
>mousedown event?
>
>On Tue, 12 Jul 2005 19:43:45 +0200
>  "Troy III Ajnej" <trojani2000 at hotmail.com> wrote:
>>I'm not sure why do you have to use the focus for the buttons to be able 
>>to fire the onclick event?
>>but if you use onfocus, or onmouseover to set focus and the action value 
>>of the button you will sulely get into trouble unevitably.
>>Be carefull how you nest the elements inside your container. The mouseover 
>>event gets fired over no matter what element you are hovering. The Z-index 
>>property might solve the problem for you. Get them buttons to be the first 
>>thing the mouse hovers to.
>>Because IE will consider any given element as a legitimate element and 
>>will fire the event for it sometimes covering the other that is near it. 
>>It is wise not to wrapp button elements in any kind of a container element 
>>because this container can oftenly receive the focus before other elements 
>>contained in it and ignore the other as mouse hovers because the mouse is 
>>still  over the same lemement that first gained the atention. This way the 
>>children are not asked if they received focus them selves, because their 
>>father has allready answered for them.
>>Don't give any css attributes to the container, no borders no background 
>>color, because the border and the background color will cause that father 
>>receives all the focus attention. But to keep it simple, try not to use 
>>the onfocus to set the properties of the button, instead try usin the 
>>this.onmousedown.
>_______________________________________________
>Javascript mailing list
>Javascript at LaTech.edu
>https://lists.LaTech.edu/mailman/listinfo/javascript

_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar - get it now! 
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/




More information about the Javascript mailing list