I am placing all my edits for a form on each form field
onBlur() event. I usually use the onSubmit event, but I can't use
the onSubmit event in this situation.
I only have a problem when there are 2 form fields with
onBlur events in sequence.
When you leave the focus for the first entry - social -the
alert box for the next entry co-social displays also. You then have
to go to the task manager to delete the session. The following is
the code for 2 form fields with onBlur events in sequence:
<td colspan="2"><font face="Arial, Helvetica,
sans-serif" size="3">
<input type="TEXT" value="" size="20" maxlength="11"
name="social" onKeypress="if (event.keyCode < 48 &&
event.keyCode != 45 || event.keyCode > 57 ) event.returnValue =
false;" onBlur = "if
(!document.loanapp2.social.value){alert('Borrower Social security
number is a required
entry!');document.loanapp2.social.focus();return false;};">
</font></td>
<td width="37%"><font face="Arial, Helvetica,
sans-serif" size="3">
<input type="TEXT" value="" size="20" maxlength="11"
name="co_social" onKeypress="if (event.keyCode < 48 &&
event.keyCode != 45 || event.keyCode > 57 ) event.returnValue =
false;" onBlur="if(document.loanapp2.co_lastname.value != ''
&& document.loanapp2.co_social.value ==
''){alert('Co-borrower Social Security Number must be entered if
Co-borrower name is
entered!');document.loanapp2.co_social.focus();return false;};"
>
</font></td>