I have something that is best handled by javascript. On submit I need to check text inputs form.password & form.password2 and if they are both not empty I need to check to see if radio button resetpassword is checked for yes. If radio button resetpassword is not set to yes I need to send an alert box. If it is set to yes I don't need to do anything.
Here is my starting code. Can you please help me get going with this.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<html xmlns="<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script language="javascript">
if (document.form.password.value)!="" && document.form.password2.value)!="") {
alert("I am an alert box!!");
else
{
alert("I am an alert box!!");
}
</script>
</head>
<body>
<form method="post" onsubmit="">
Password: <input name="password" type="text" /><br />
Confirm Password: <input name="password2" type="text" /><br />
Reset Password:Yes <input name="resetpassword" type="radio" value="1" /> No <input name="resetpassword" type="radio" value="0" checked />
</form>
</body>
</html>
Here is my starting code. Can you please help me get going with this.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<html xmlns="<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script language="javascript">
if (document.form.password.value)!="" && document.form.password2.value)!="") {
alert("I am an alert box!!");
else
{
alert("I am an alert box!!");
}
</script>
</head>
<body>
<form method="post" onsubmit="">
Password: <input name="password" type="text" /><br />
Confirm Password: <input name="password2" type="text" /><br />
Reset Password:Yes <input name="resetpassword" type="radio" value="1" /> No <input name="resetpassword" type="radio" value="0" checked />
</form>
</body>
</html>