Hi,

window.event.keycode works for IE to capture key input, not for Firefox.

Firefox throws an error "window.event has no properties".


So....what code can be used for both?


*** My HTML snippet:

<body onKeyDown="setCmdKeyIE();" >
...
</body>


*** My Javascript snippet:

function setCmdKeyIE() {
   var cmdkeycode = "";
   if (window.event.keyCode != 13 & window.event.keyCode != 33 &
      window.event.keyCode != 34 & window.event.keyCode < 112 ) return;
   ...
}


Cheers,

Simon


*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
*******************************************************************

Reply via email to