Hi, Please find the simple code below for checking password.
<HTML>
<Body>
<h2>Checking the Password</h2><br><hr>
<Form name=form1>
Enter the Password:
<Input type=password name=text1>
<br>
<Input type=button name=button1 value="Check">
<br><hr>
<h2>Changing the Password</h2><br><hr>
Enter the New Password:
<Input type=password name=text2>
<br>
<Input type=button name=button2 value="Change">
<br>
</Form>
<Script language="vbscr ipt">
dim pass,a
pass="rajeev"
Sub button1_Onclick ()
if (Form1.text1.va lue=pass)then
msgbox "Password Correct"
else
msgbox "Password Incorrect"
endif
End Sub
Sub button2_OnClick ()
if (Form1.text2.va lue<>pass)then
msgbox "Password Changed"
else
msgbox "Invalid Password"
endif
End Sub
</Script>
</Body>
</HTML>
This code is not working.. I dont know what mistake i have done. Please help me in solving this problem.. Thanks in advance..
Thanks,
Vasuki
<HTML>
<Body>
<h2>Checking the Password</h2><br><hr>
<Form name=form1>
Enter the Password:
<Input type=password name=text1>
<br>
<Input type=button name=button1 value="Check">
<br><hr>
<h2>Changing the Password</h2><br><hr>
Enter the New Password:
<Input type=password name=text2>
<br>
<Input type=button name=button2 value="Change">
<br>
</Form>
<Script language="vbscr ipt">
dim pass,a
pass="rajeev"
Sub button1_Onclick ()
if (Form1.text1.va lue=pass)then
msgbox "Password Correct"
else
msgbox "Password Incorrect"
endif
End Sub
Sub button2_OnClick ()
if (Form1.text2.va lue<>pass)then
msgbox "Password Changed"
else
msgbox "Invalid Password"
endif
End Sub
</Script>
</Body>
</HTML>
This code is not working.. I dont know what mistake i have done. Please help me in solving this problem.. Thanks in advance..
Thanks,
Vasuki
Comment