Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

simple javascript "isnumeric" check 1

Status
Not open for further replies.

jaredc

Programmer
Jun 28, 2002
43
GB
Hi, I'm new to this forum but i think (hope!) my question should quite straightforward. I am designing a web page where customers enter data. I want to validate one of the fields using javascript to ensure that only numeric data is entered.

In VBScript I would write something like:

Code:
If IsNumeric(strData) then 
     do something
else 
     do something else
end if

I am hoping there is something similar to the "IsNumeric" function in Javascript, although I haven't uncovered one yet....

Many thanks in advance for any thoughts or advice
 
Thanks for that sjarvee, I've got it working a treat now!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top