Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

set focus on a field in netscape on blur! Interesting !

Status
Not open for further replies.

viztek

Programmer
Nov 7, 2000
30
IN
Hi,

I need to do a validation onblur event and after the validation i need to set focus on the same field on which i did the validation. In netscape after the onblur event the focus moves on to the next field. So what is happening is that the validation could occur only once. I need to do a field level validation.

Viztek
 

... onblur="validateField(this)">

<script>
function validateField(field) {
// validation actions
// if not OK then
field.focus();
}
</script>
 
focus moves to the next field after the validation chck it out on a page. and remr i am talking abt netscape.

Viztek
 
I use functions similar to the one I posted and they work as expected - in all browsers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top