aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes check number Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "check number" Watch "check number" New topic
Author

check number

feroz muhamed
Ranch Hand

Joined: Nov 15, 2003
Posts: 87
how i can check the input text is number or string in a textbox?
Tom Blough
Ranch Hand

Joined: Jul 31, 2003
Posts: 263
It depends on if you want to check it while it is being entered, or after it has been entered.
You can do it by limiting the characters that can be entered in the box, you can check it with regular expressions after it has been entered, or you could attempt to convert it to a number. If the conversion fails, it contains non-numeric characters.
Can you provide some more details?
[ November 26, 2003: Message edited by: Tom Blough ]

Tom Blough<br /> <blockquote><font size="1" face="Verdana, Arial">quote:</font><hr>Cum catapultae proscriptae erunt tum soli proscripti catapultas habebunt.<hr></blockquote>
feroz muhamed
Ranch Hand

Joined: Nov 15, 2003
Posts: 87
hello
I have a textfield in my html page. i want only numbers should enter on it no string or chars
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Learn to use google...look at result wither 4 or 5 I think it was...
Google Works
Eric
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: check number