Hi,
Does anybody has a cross browser script for detecting function keys.. am trying to print a web page when user clicks on F8 key .. for Internet Explorer am able to get window.event.keycode which is 119 …but how to let my code work on all browsers .. for the above function.. anybody pls.help.
thanks
i’ve a function which works in i.e., but not in NETSCAPE or FIREFOX. PLS.HELP..
the below function works in I.E
document.onkeydown = function(){
if(window.event && window.event.keyCode == 119)
{ // Capture and remap F5
window.event.keyCode = 505;
}
if(window.event && window.event.keyCode == 505)
{ // New action for F5
alert(‘F8 key was pressed’);
return false;
// Must return false or the browser will refresh anyway
}
}.