[Javascript] Need help with IE events - FIXED

Mike Dougherty mdougherty at pbp.com
Tue Jul 12 12:54:25 CDT 2005


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.



More information about the Javascript mailing list