Cheers Stephen
Thats the Ticket.
Cheers
Jerry
-----Original Message-----
From: Stephen Moretti [mailto:[EMAIL PROTECTED]]
Sent: 05 July 2001 09:23
To: CF-Talk
Subject: RE: Data Validation
Jerry,
> Could anyone inform me of the best javascript function to validate
a
> textbox, so that only a number can be entered.
>
The JS function you are after is : isNaN()
Its actually "is not a number". So you need to do something like :
if (isNaN(document.myform.myfield.value)) {
alert("You did not enter a number");
return false;
}
Hope this helps
Regards
Stephen
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists