View Full Version : Whats the most standards-compliant way.....
.....to handle events in Internet Explorer and Mozilla?
I'm currently trying to use the DOM2 Event interface, it works nicely in Mozilla but Internet Explorer hates me for doing that :(
Neither browser is 100% compliant w/ W3C recommendations. You must design according to your target audience.
look here (http://developer.irt.org/script/dhtml.htm) and here (http://developer.irt.org/script/script.htm)
Thanks for the links TonyT.
Looks like I'll have to make use of that isIE variable afterall (I was trying to stay away)
Since IE doesn't have the event object passed as a parameter for the function.
Is there a way to this
<div id="blah" onMouseOver="bleh(this, 'whatever');">etc. etc.</div>
in javascript, that is. set an event handler while passing unique arguments to the function.
Then I can automate event handler attachment using data from Arrays and stuff, without having to do it manually within the html.
did this make sense?
what you want may be here:
http://developer.irt.org/script/event.htm
Thankyou,
I could find out exactly what I wanted to know, but that doesn't matter :p
I've went with the good ol' way of isIE and then just handling the events for IE differently.
vBulletin® v3.8.4, Copyright ©2000-2010, Jelsoft Enterprises Ltd.