Ie9 Quirks Mode Doesn't Pass Event Parameter To Event Handler
I have a problem with the IE9 quirks mode. I have registered an oncahnge-event to an input element. This works so far, but in IE9 our site goes to quirks mode (it is as it is) and
Solution 1:
I suppose the event is global in IE quirks mode, so checking the event parameter and assign window.event
if it's undefined
would solve the problem:
function myChangeMethod(evt){
//In IE 9 quirks mode "event" is undefined...
evt = evt || window.event; //<== HERE
// additionally in quirks mode evt.target is evt.srcElement,
// so if needed you could assign evt.target as:
var originator = evt.target || evt.srcElement;
if(evt){
//do stuff
}
}
Post a Comment for "Ie9 Quirks Mode Doesn't Pass Event Parameter To Event Handler"