Welcome to WebmasterWorld Guest from

Forum Moderators: open

Message Too Old, No Replies

window.event has no properties

Firefox window.event has no properties



2:16 pm on Dec 29, 2006 (gmt 0)

10+ Year Member


im busy with a simple script that uses javascript and works ok but it does give a javascript error in firefox web-developer.

its says...

window.event has no properties
line 23

and thats.....

Key = (document.layers)?e.which:window.event.keyCode;;

full part is :

document.onkeypress = keyhandler;
function keyhandler(e) {
Key = (document.layers)?e.which:window.event.keyCode;;
if( Key == 13 ¦¦ Key == 32){ //13 is ascii value for Enter key 32 is space
convertor9(); //call your function here

if( Key == 27 ¦¦ Key == 8 ){ //27 is ascii value for Escape key 8 = backspace
clearConverse(); //call your function here

can his be solved?


4:58 pm on Dec 29, 2006 (gmt 0)

WebmasterWorld Senior Member fotiman is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

Key = (document.layers)?e.which:window.event.keyCode;;

Why are you checking document.layers? Get rid of that. Change it to this and see if it works:

Key = (e.which)?e.which:window.event.keyCode;


6:18 pm on Dec 29, 2006 (gmt 0)

10+ Year Member

i have no idea,it was part of the javascript....
but your right...it solved it....
thank you very much Fotiman :)

Featured Threads

Hot Threads This Week

Hot Threads This Month