After checking for an error in a text field, I want to clear the field and set the focus back to it. Here's a sample so far. I can get the field to null out. Cannot get the cursor back home though with the .focus or .focus() even if I 'rem out the line ...value="" for testing just the .focus line. Have also tried the line with just mainF.usrSSN.focus or mainF.usrSSN.focus()
Sub OnChange_usrSSN()
If IsNumeric(document.mainF.usrSSN.value) = false then
MsgBox "You have entered letter characters in the SSN rather than numbers. Please redo.",,"......Enter numeric characters only"
document.mainF.usrSSN.value = ""
document.mainF.usrSSN.focus
End If
End Sub
Thank you,
Sub OnChange_usrSSN()
If IsNumeric(document.mainF.usrSSN.value) = false then
MsgBox "You have entered letter characters in the SSN rather than numbers. Please redo.",,"......Enter numeric characters only"
document.mainF.usrSSN.value = ""
document.mainF.usrSSN.focus
End If
End Sub
Thank you,