Key code pressed in Netscape

admin

Administrator
Staff member
Hi all,

Inside an html textbox tag I have an "onKeyPress" event that invokes function "myFunction". Inside "myFunction", I use the "event.keyCode" syntax to read the key code pressed by the user from IE browser. What is the syntax to get the key code pressed from Netscape?

Secondly, I also have an "onChange" event in this textbox. Inside "onChange" event handler I have logic to focus back to the textbox in case of illegal data entry:

document.myform.mytextbox.focus();
return false;

IE works perfect but Netscape tabs to the next control regardless. Anyone has any idea why?

Thanks in Advance
krahb
 
Back
Top