Answer the question
In order to leave comments, you need to log in
Event target in Firefox
Good afternoon!
There is a function:
function changeHandler(e) {
var targ;
if (!e) var e = window.event;
if (e.target) targ = e.target; else if (e.srcElement) targ = e.srcElement;
alert(targ.type);
}
It hangs on input events: onchange='changeHandler()' onkeyup='changeHandler()'
In IE and Chrome, everything works as intended, an alert pops up with the type of the triggered event. But in Firefox e and, accordingly, targ is always undefined. What could be the reason for this and how to properly get the event object in FF?
Thank you.
Answer the question
In order to leave comments, you need to log in
stackoverflow.com/questions/4581976/window-event-srcelement-not-working-in-firefox
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question