@phpnoviceMay 27.2006 — #That W3Schools example is written for IE only. Surprising! At any rate... In Mozilla (and other browsers, except IE), the [B]event[/B] object (which has a different format than IE's) is passed as an argument to an event handler. Thus, you must perform object detection in your event handlers to determine which event object with which to work. function eventHandler(evt) { if(evt) { // Netscape event object alert(evt.which); // for both key and button codes } else { // IE event object alert(event.keyCode); // or, event.button } return true; }