Can some one help me with window.event error on firefox
Hi,
we have a internal web application which works well on IE, when tried to open same application using firefox, says window.event is undefined... I tried to rewrite the below function using my little knowledge on javascript with no success. can some one help me...
function testKey(menuArray){
var i;
// keycode for F5 function
if (window.event && window.event.keyCode == 116) {
refresh();
window.event.keyCode = 8;
}
// keycode for backspace
if (window.event && window.event.keyCode == 8 && // hit 'backspcace and either ....
(window.event.srcElement.nodeName != "INPUT" || // not in input or
(window.event.srcElement.nodeName == "INPUT" && window.event.srcElement.readOnly) // in input but it is readonly
)
)
{
// try to cancel the backspace
window.event.cancelBubble = true;
window.event.returnValue = false;
return false;
}
Bookmarks