File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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...
 
jQuery in Action, 2nd edition
 
subject: how to validate a text field with numeric value