Log in

View Full Version : Verify Password



theplace4fun
05-01-2007, 11:09 AM
Ok. I just joined than, and i need the answer to the most simplest question.
This is my code for signing up to my website:
<!--webbot bot="HTMLMarkup" startspan --><form method="post" enctype="multipart/form-data" action="http://pub12.bravenet.com/emailfwd/senddata.php">
<input type="hidden" name="usernum" value="948392434">
<input type="hidden" name="cpv" value="2">
<!-- DO NOT CHANGE OR REMOVE THE 3 TAGS ABOVE THIS COMMENT-->

<table border="0" cellpadding="0" cellspacing="0" align="center">
<tr>
<td><h3 style="border-bottom:0px solid black;">Sign Up</h3></td>
</tr>
<tr>
<td>

<label for="username" style="display:block;margin-bottom:5px;">Preferred Username:</label><input type="text" name="username" id="username" value="" maxlength="" style="width:80px;"><div style="clear:left;height:20px;"> </div>

<label for="password" style="display:block;margin-bottom:5px;">Preffered Password:</label><input type="password" name="password" id="password" value="" maxlength="" style="width:80px;"><div style="clear:left;height:20px;"> </div>

<label for="Vpass" style="display:block;margin-bottom:5px;">Verify Password:</label><input type="password" name="Vpass" id="Vpass" value="" maxlength="" style="width:80px;"><div style="clear:left;height:20px;"> </div>

<label for="Email" style="display:block;margin-bottom:5px;">Email Address:</label><input type="text" name="Email" id="Email" value="" maxlength="" style="width:80px;"><div style="clear:left;height:20px;"> </div>


</td>
<tr>
<td align="right">
<!-- YOU CAN MODIFY THE TEXT WITHIN VALUE="" TO MODIFY YOUR BUTTON TEXT-->
<input type="submit" value=" Submit "> <input type="reset" value=" Reset ">
</td>
</tr>
</table>
</form>
<!--webbot bot="HTMLMarkup" endspan -->
How do i make it, so if "password" and "Vpass" aren't the same thing, it does this code:
<div id="dropinboxv2cover">
<div id="dropinboxv2">

Sorry, your passwords do not match.<br>
<p align="right"><a href="#" onClick="dismissboxv2();return false">Close It</a></p>

</div>
</div>

boogyman
05-01-2007, 12:34 PM
THE FORM


<form name="signup" method="post" onSubmit="verifyIt(this)" onReset="javascript:confirm(Reset The Form?)">
<fieldset>
<legend>Sign Up</legend>
<p>
<label for="username">Preferred Username:</label>
<input type="text" name="username" id="username" value="" />
</p>
<p>
<label for="password">Preffered Password:</label>
<input type="password" name="password" id="password" value="" />
</p>
<p>
<label for="Vpass">Verify Password:</label>
<input type="password" name="Vpass" id="Vpass" value="" />
</p>
<p>
<label for="Email">Email Address:</label>
<input type="text" name="Email" id="Email" value="" />
</p>
<input type="submit" value="Submit" />
<input type="reset" value="Clear Form" />
</fieldset>
</form>



MAKING IT LOOK GOOD


<style type="text/css">
<!--
p label {
float: left;
clear: left;
}
p input {
float: right;
clear: right;
}
// -->
</style>



Function to see if they are the the same, alert user if they aren't and return to the "password" field


<script type="text/javascript">
// <![CDATA[
function verifyIt() {
form = document.signup;
if(form.password.value !== form.Vpass.value) {
alert("Passwords do not match, please check them")
form.password.focus();
}
}
// ]]>
</script>

theplace4fun
05-05-2007, 05:23 AM
btw thanks boogyman
<!--webbot bot="HTMLMarkup" startspan --><form method="post" enctype="multipart/form-data" action="http://pub12.bravenet.com/emailfwd/senddata.php" onSubmit="verifyIt(this)" onReset="javascript:confirm(Reset The Form?)">
<input type="hidden" name="usernum" value="948392434">
<input type="hidden" name="cpv" value="2">
<!-- DO NOT CHANGE OR REMOVE THE 3 TAGS ABOVE THIS COMMENT-->

<table border="0" cellpadding="0" cellspacing="0" align="center">
<tr>

</tr>
<tr>
<legend>Sign Up</legend>
<p>
<label for="username">Preferred Username:</label>
<input type="text" class="formbutton2" name="username" id="username" value="" />
</p>
<p>
<label for="password">Preffered Password:</label>
<input type="password" class="formbutton2" name="password" id="password" value="" />
</p>
<p>
<label for="Vpass">Verify Password:</label>
<input type="password" class="formbutton2" name="Vpass" id="Vpass" value="" />
</p>
<p>
<label for="Email">Email Address:</label>
<input type="text" class="formbutton2" name="Email" id="Email" value="" />
</p>


</form>
<tr>
<td align="right">
<!-- YOU CAN MODIFY THE TEXT WITHIN VALUE="" TO MODIFY YOUR BUTTON TEXT-->
<p align="center"><input type="submit" value=" Submit " class="formbutton" > <br><br><input type="reset" value=" Reset " class="formbutton"></p>


</td>
</tr>
</table>
</form>
<!--webbot bot="HTMLMarkup" endspan -->
Forget about class="form" because thats just to make it look better. But now, when i click submit, absolutly nothing happens.

thetestingsite
05-06-2007, 07:07 PM
You may want to make sure that you are not getting an error in the javascript function "verifyIt". If you could post a link to your problem page, that would help us to solve this problem a lot quicker.

Sorry for the delayed response, but hope this helps.