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;
}

if(window.event.keyCode == 27){ // Esc key code here
try{
// menu1.releaseCapture();
for(i=0; i<menuArray.length; i++){
menuArray[i].style.display="none";
}
}catch(e){
}finally{
}
}

if(window.event.ctrlKey){ // ctrl key is press
try{
eval(shortCutToFunction.Item(String.fromCharCode(window.event.keyCode)));
}catch(e){
}finally{
}
}
}

Thanks in advance.