[thelist] Validating Form for Numeric Data
Burhan Khalid
burhankhalid at members.evolt.org
Tue Nov 12 13:41:04 CST 2002
BH> After a long night last night, I'm a bit lazy today so I was hoping for a
BH> simple code snippet.
BH> My form has a text input field called "ImpoundNo". What's the javascript to
BH> ensure that the data entered in that field is only numeric (no decimals)?
isNumeric() ?
to find out if it has a decimal or not :
if ( strString.indexof('.') >= 0 ) <-- it has a decimal
--
*---------------*
| Burhan Khalid |
*---------------*---------------------------*
| Email : burhankhalid[at]members.evolt.org |
| Web : members.evolt.org/burhankhalid |
*-------------------------------------------*
More information about the thelist
mailing list