aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes validating that field has a number Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "validating that field has a number" Watch "validating that field has a number" New topic
Author

validating that field has a number

Lauren Pender
Greenhorn

Joined: Jun 15, 2001
Posts: 5
I would like to validate in javascript that the text entered in a field is a number.
Dave Vick
Ranch Hand

Joined: May 10, 2001
Posts: 3244
Lauren
use this test
if (isNaN(document.formName.fieldName.value))
if it returns true then the value in the field is not a number.
hope that helps
Dave
[This message has been edited by Dave Vick (edited June 19, 2001).]


Dave
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: validating that field has a number