Please see this for more info about event handling:
http://p2p.wrox.com/javascript/faq.asp#no35
/Robert
-----Original Message-----
From: T.Gopalakrishnan [mailto:tgk26@r...]
Sent: den 22 februari 2003 15:38
To: javascript
Subject: [javascript] RE: keypress event in Netscape
I am using Netscape 7.0.i want to restrict the enter key in the
TEXTAREA. If i use the following program it works in IE 6.0 but not in
Netscape
<HTML>
<BODY>
<FORM>
<TEXTAREA name=3D"test" onKeyPress=3D"trapEnterKey(event)"></TEXTAREA>
</FORM>
<SCRIPT Language=3D"Javascript">
function trapEnterKey(event){
if(event.keyCode=3D=3D13) event.keyCode=3D0;
}
</SCRIPT>
</BODY>
</HTML>