![]() |
Available news archives:
comp.lang.tcl
-
comp.lang.python
-
comp.security.firewalls
-
sci.crypt -
comp.lang.php -
comp.lang.javascript
|
|
comp.lang.javascript archiveStopping user from inputting anything other than letters and numbers
From: Astra <No@Spam.com>
Date: Thu Aug 11 2005 - 11:49:11 CEST
Hi
I'm using the following routine on a text box to stop users from typing
<SCRIPT LANGUAGE="javascript">
var key = (navigator.appName == "Netscape") ? e.which : e.keyCode;
if (key == 8 || (key > 47 && key < 58) || (key > 64 && key < 91) || (key >
// 8 = backspace
}
My problem is that if somebody holds down the shift key and say 5 then % is
Is there anyway round this?
Thanks
Robbie
|