I'm pretty new to asp and I'm using the following script to validate a password submission. The form is called passwordverify and the two fields are password and passconfirm.
I have the script located before the html and head tags. When I hit the submit button on the form I get HTTP 405 error from the browser.
Anyone know what's wrong with this scenario?
<SCRIPT LANGUAGE="VBScript">
<-- Option Explicit
'Define variables to be used in the function
Dim validation
'pulls data from form fields puts them into variables
Dim varpassword
if (Request.Form("password" <> "" then varpassword = Request.Form("password"
Dim varpassconfirm
if (Request.Form("passconfirm" <> "" then varpassconfirm = Request.Form("passconfirm"
Function passwordverify_OnSubmit
Dim same
'do a case sensitive comparison of the strings
same = StrComp(varpassword, varpassconfirm, 0)
'if the password and passconfirm fields are different then display a message box and set validation to false otherwise set validation to True and get on with submitting the form
if same = 0 then validation = True
else
validation = False
msgbox "Password mismatch in password and confirm password fields. Click OK and reenter your password. You're getting there kiddo.",8
end if
if validation = True then passwordverify_OnSubmit = True
else
passwordverify_OnSubmit = False
end if
End Function
</SCRIPT>
I have the script located before the html and head tags. When I hit the submit button on the form I get HTTP 405 error from the browser.
Anyone know what's wrong with this scenario?
<SCRIPT LANGUAGE="VBScript">
<-- Option Explicit
'Define variables to be used in the function
Dim validation
'pulls data from form fields puts them into variables
Dim varpassword
if (Request.Form("password" <> "" then varpassword = Request.Form("password"
Dim varpassconfirm
if (Request.Form("passconfirm" <> "" then varpassconfirm = Request.Form("passconfirm"
Function passwordverify_OnSubmit
Dim same
'do a case sensitive comparison of the strings
same = StrComp(varpassword, varpassconfirm, 0)
'if the password and passconfirm fields are different then display a message box and set validation to false otherwise set validation to True and get on with submitting the form
if same = 0 then validation = True
else
validation = False
msgbox "Password mismatch in password and confirm password fields. Click OK and reenter your password. You're getting there kiddo.",8
end if
if validation = True then passwordverify_OnSubmit = True
else
passwordverify_OnSubmit = False
end if
End Function
</SCRIPT>