_eventButtonElement = window.event.srcElement;
How can I solve that in firefox?
Firefox uses an event argument that gets passed into an event function
Change your code from this:
window.onload = function() {
//CODE
_eventButtonElement = window.event.srcElement;
//CODE
};
To this:
window.onload = function(e) {
//CODE
_eventButtonElement = window.event.srcElement || e.target;
//CODE
};
One of the cross Browser issues. Use this:
var evnt = event || window.event;
_eventButtonElement = evnt.target || evnt.srcElement;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With