Jump to content

Archived

This topic is now archived and is closed to further replies.

natalieG

ONsBMIT EVENT

Recommended Posts

The alert boX does not show even IF nrwpass1 <> newpass2

[font=Verdana]<head>
<script Language="JavaScript">
function matchpwd(){
if (document.pwdform.NEWPASS1.value==document.pwdfrom.NEWPASS2.value)
{return true;}else {alert("password mismatch"); return false;}
}//matchpwd
</script>........</head>

<form action="http://msdsimaging.com/atmelpim/pim_main.php" method="get"
name="pwdform" onSubmit="return (matchpwd())">[/font]________________________________________________________________________

<table width="300" border="0" cellspacing="0" cellpadding="0" bgcolor="#dddddd">
<TR><TD COLSPAN="2"align= "center"><div class="redclass">Change Password</div></td></tr>

<TR><TD><div class="redclass">Index</div></td>
<td><input type="text" name="PINDEX" size="2" maxlength="2" border="0"  readonly
        VALUE="<?php echo $PINDEX; ?>"></td></tr>

    <TR><TD><div class="redclass">Organization</div></td>
<td><input type="text" name="REPFIRM" size="10" maxlength="15" border="0" readonly
        VALUE="<?php echo $REPFIRM; ?>"></td></tr>

    <TR><td><div class="redclass">Supervisor</div></td>
<td><input type="text" name="SUPERVISOR" size="10" border="0"  readonly
        VALUE="<?php echo $SUPERVISOR; ?>"></td></tr>

    <TR><td><div class="redclass"> Old Password</div></td>
<td><input type="text" name="PASSWORD" size="10" maxlength="10" border="0"  readonly
        VALUE="<?php echo $PASSWORD; ?>"></td></tr>

    <TR><td><div class="redclass"> New Password</div></td>
<td><input type="text" name="NEWPASS1" size="10" maxlength="10" border="0"></td></tr>

    <TR><td><div class="redclass"> Repeat Password</div></td>
<td><input type="text" name="NEWPASS2" size="10" maxlength="10" border="0"></td></tr>

    <tr><td colspan="2" align="center"><input type="submit" name="submitButtonName" border="0" value="Post"><input type="reset" border="0"></td></tr>
</table>
</form>

.

Share this post


Link to post
Share on other sites
try to change the onsubmit to "return matchpwd();"

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.