This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
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 OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA 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