natalieG Posted July 9, 2006 Share Posted July 9, 2006 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>. Quote Link to comment https://forums.phpfreaks.com/topic/14067-onsbmit-event/ Share on other sites More sharing options...
nogray Posted July 10, 2006 Share Posted July 10, 2006 try to change the onsubmit to "return matchpwd();" Quote Link to comment https://forums.phpfreaks.com/topic/14067-onsbmit-event/#findComment-55615 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.