Hi, check the following to get the answer:

http://developer.mozilla.org/en/docs/Migrate_apps_from_Internet_Explorer_to_Mozilla#Event_differences

Max.


2007/10/8, Simon Cockayne <[EMAIL PROTECTED]>:
> 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]
> *******************************************************************
>
>


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

Reply via email to