[Javascript] required entry field

Mckinney, Lori K lkmckinn at ingr.com
Wed Mar 26 15:50:38 CST 2003


Onsubmit cancels.
http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/events/onsubmit.asp?frame=true

Onblur doesn't.
http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/reference/events/onblur.asp?frame=true

-----Original Message-----
From: Michael Dougherty [mailto:Michael_Dougherty at PBP.com]
Sent: Wednesday, March 26, 2003 03:50 PM
To: javascript at LaTech.edu
Subject: RE: [Javascript] required entry field


OK, i have done plenty of 'work arounds' before...

If this were the onSubmit method of a form, the "return false" syntax WOULD
prevent the form submission, right?  So what i'm seeing is an inplementation
unpleasantry of the onBlur method?

-----Original Message-----
From: javascript at LaTech.edu [mailto:javascript at LaTech.edu]
Sent: Wednesday, March 26, 2003 3:45 PM
To: javascript at latech.edu
Subject: Re: [Javascript] required entry field


I would naturally think that once onBlur is called, it's going to lose
focus
no matter what.  I would change the routine so that way it specifically
sets the focus back to that field instead of just trying to cancel the
onblur
event.

Chris Tifer
http://emailajoke.com


----- Original Message -----
From: "Michael Dougherty" <Michael_Dougherty at PBP.com>
To: <javascript at LaTech.edu>
Sent: Wednesday, March 26, 2003 4:25 PM
Subject: [Javascript] required entry field


>> function isValid( checkValue ) {
>> return (checkValue!='')
>> }
>>
>> <input type='text' name='NeverBlank' value='' onBlur='return
>> isValid(this.value)' />
>>
>>
>>   The idea is to prevent the user from exiting this field while it's
blank.
>> (OK, so this would be a user-hostile experience - it's just an example)
>>
>>   What i'm seeing is that when the user hits TAB, the focus moves to the
>> next field - regardless of the return value from isValid()
>>
>>   Any thoughts?
>>
>> _______________________________________________
>> Javascript mailing list
>> Javascript at LaTech.edu
>> https://lists.LaTech.edu/mailman/listinfo/javascript

_______________________________________________
Javascript mailing list
Javascript at LaTech.edu
https://lists.LaTech.edu/mailman/listinfo/javascript

_______________________________________________
Javascript mailing list
Javascript at LaTech.edu
https://lists.LaTech.edu/mailman/listinfo/javascript


More information about the Javascript mailing list