[Javascript] required entry field

Michael Dougherty Michael_Dougherty at PBP.com
Wed Mar 26 15:25:15 CST 2003


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?



More information about the Javascript mailing list