Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes HTML, CSS and JavaScript and the fly likes how to validate a text field with numeric value Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "how to validate a text field with numeric value" Watch "how to validate a text field with numeric value" New topic
Author

how to validate a text field with numeric value

geetu hindu
Greenhorn

Joined: Apr 12, 2006
Posts: 9
please tell me how to make it mandatory for a user to enter only Numeric value in a text field
Satish SN
Ranch Hand

Joined: Apr 19, 2005
Posts: 70
hi,

u can find innumeral javascript validations for this u can straight away visit JavaScript.com good sight for these validations


Satish SN<br />SCJP 1.4 & SCWCD 1.4
Ram kanana
Ranch Hand

Joined: Apr 13, 2006
Posts: 34
Using java utility class
Akshayan Venkatesh
Greenhorn

Joined: Apr 13, 2006
Posts: 26
Answer.

if you want only numeric value in the text box using this line

isNaN(parseInt(document.form.field.value)

whether form is a current form and field is which field to check...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to validate a text field with numeric value
 
Similar Threads
Validate textbox to accept only numeric values.
Comparing two string variables
convert from string to int
help :::Allow user to enter only numeric value
how to read data from db file