Jump to content

ONsBMIT EVENT


natalieG

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>

.
Link to comment
https://forums.phpfreaks.com/topic/14067-onsbmit-event/
Share on other sites

Archived

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

×
×
  • Create New...

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.