View Single Post
  #1 (permalink)  
Old March 31st, 2004, 03:27 PM
bukky bukky is offline
Authorized User
Join Date: Feb 2004
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Default validating input

I am trying to validate my input by writing a client side vbscript, but it is not working and I don't have errors, but it's not validating my input. Here's the code:

<% Response.Expires = 0 %>
<% Response.Buffer = False %>
Password verification are you caching

<Title>Passoword change website</title>
<h2>Try changing your password</h2>
are you caching
<form method=post action="start2201.asp" NAME=frmUser>
<p>Please enter your student id:</p>
<p><INPUT type="text" name="StudentId" size="10"></p>
<p>Please enter your student old password:</p>
<p><INPUT type="password" name="Password"></p>
<p>Please enter your newpassword:</p>
<p><INPUT type="password" name="NewPassword"></p>
<p>Please verify your new password:</p>
<p><INPUT type="password" name="VerifyPassword"></p>

<p><input type="submit" value="Submit"><input type="reset" value="Reset"></p>

<SCRIPT language="vbscript">
Sub VerifyData()
          If Len(frmUser.NewPassword.value) = 0 then
        Alert ("You must enter a password")
                Exit Sub
    end if
Call frmUser.submit()
End Sub


Reply With Quote