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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Button doesn't work... use to.

Status
Not open for further replies.

Telsa

Programmer
Jun 20, 2000
393
0
0
US
Button doesn't work... use to. Only change I made was the reference to @ code requirement. Can anyone tell me what is going on here???

<SCRIPT LANGUAGE=vbscript>
Sub btnSubmit_onclick()
If Len(frmNewUser.custemail.value) = 0 THen
Alert &quot;Please enter your email address!&quot;
frmNew.custemail.focus
exit sub
ElseIF Len(frmnewUser.custemail.value) > 0 Then
If instr(1, Len(frmNewUser.Custemail.value),@) = 0 Then
Alert &quot;Please enter your FULL valid email address-including @hp.com or @non.hp.com&quot;
frmNew.custemail.focus
End IF
exit sub
ElseIF Len(frmNewuser.PWD.value) = 0 Then
Alert &quot;Please enter a password!&quot;
frmNew.pwd.focus
exit sub
ElseIF Len(frmNewuser.PWD2.value) = 0 Then
Alert &quot;Please enter your password again.&quot;
frmNew.pwd2.focus
exit sub
ElseIF frmNewUser.PWD.value <> frmNewUser.PWD2.value Then
Alert &quot;Passwords don't match, please enter again.&quot;
frmNew.PWD.focus
End IF
Call frmNewUser.submit()
end sub
</script>
Mary :)

Rule 1: Don't sweat the small stuff.
Rule 2: EVERYTHING is small stuff!! X-)
 
Nevermind... I figured it out. Quotes around @ works and removing the len statement in instr. Mary :)

Rule 1: Don't sweat the small stuff.
Rule 2: EVERYTHING is small stuff!! X-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top