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


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Text field validation on exit" Watch "Text field validation on exit" New topic
Author

Text field validation on exit

Frank Daly
Ranch Hand

Joined: Mar 31, 2000
Posts: 139
Hi
Can I validate the contents of a text field on exiting the text field using java Script?
TIA.
Frank
swaroop shastri
Ranch Hand

Joined: Aug 15, 2001
Posts: 65
i remember having used the "onBlur" event for doing this.
<input type="text" value="somevalue" onBlur="return validate();">
Frank Daly
Ranch Hand

Joined: Mar 31, 2000
Posts: 139
Thanks Swaroop
Thomas Paul
mister krabs
Ranch Hand

Joined: May 05, 2000
Posts: 13974
You can also use onChange since it will only be invoked when the user leaves the field (assuming the user made a change).


Associate Instructor - Hofstra University
Amazon Top 750 reviewer - Blog - Unresolved References - Book Review Blog
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Text field validation on exit
 
Similar Threads
SchemaExportTask query
JInternalFrame to get Focus
inherting classes avalibile i jar
Positioning the cursor in an input field
How to disable the right click button in Textfield o HTML form with NN4