I'm unsure about onKeyDown, but NS4 does support onKeyPress. Here is my keyboard event handler... ..onKeyPress="return evt(event)"
function evt(e) { if (window.event) keyPressed = window.event.keyCode; else if (e) keyPressed = e.which; else return true; //do stuff } ----- Original Message ----- From: "Thanh Nguyen" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Thursday, April 18, 2002 4:39 PM Subject: Javascript: onKeydown event > Hi all, > > Anybody know if Netscape 4.X support onKeydown event? > > I have the following script, It works in IE and Netscape 6.2 but it doesn't > seem to work in Netscape 4.7 > > <script language="JavaScript"><!-- > function handler(e) { > var key = (navigator.appName == "Netscape") ? e.which : e.keyCode; > if (key == 13 || key == 46 || (key > 47 && key < 58)) return true; else > return false; > } > //--></script> > > > <form> > <input type="text" onKeyDown="return handler(event)" onKeydown="return > handler(event)"> > </form> > > Any Ideas why it doesn't work? > > > Thanks > > ______________________________________________________________________ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists