This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes How can i trace this.. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "How can i trace this.." Watch "How can i trace this.." New topic
Author

How can i trace this..

Pranit Saha
Ranch Hand

Joined: Sep 09, 2001
Posts: 130
Hi,
How can i check whether user has typed number in name field and text in age field or telephone no. field..
pls help..
Thanks in advance..
Pranit..
Heath Lilley
Ranch Hand

Joined: Jan 09, 2001
Posts: 72
You could use the onBlur and onFocus() event handler to get notification of when the text has changed. Then test the "form control name to get the actual form control and test to see which one it was. Then get the value from the control and do tests like isNaN(value) to see if it is a number and such.

Here is an example...

[This message has been edited by Heath Lilley (edited October 17, 2001).]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How can i trace this..