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 Text field validation on exit 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 "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