retype password verification not working
<p>I used the following code:</p>

<pre><code>&lt;script type="text/javascript"&gt;
function validate() {
    if ((document.changepass.newpassword.value != '') &amp;&amp;
(document.changepass.retypenewpassword.value ==
document.changepass.newpassword.value)){
            document.changepass.retypenewpassword.blur();
            document.changepass.submit();

    }
}
&lt;/script&gt;

&lt;form name="changepass" method="POST" action="changepassword.jsp" onsubmit="return validate();"&gt;

&lt;table align="center"&gt;
    &lt;tr&gt;
        &lt;td&gt;New Password:&lt;/td&gt;
        &lt;td&gt;&lt;input type="password" name="newpassword" size="20"
            style="width: 145px" maxlength="10"&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;Retype New Password:&lt;/td&gt;
        &lt;td&gt;&lt;input type="password" name="retypenewpassword" size="20"
            style="width: 144px" maxlength="10"&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;&lt;input type="submit" value="Change Password" name="operation" &gt;&lt;/td&gt;
        &lt;td&gt;&lt;input type="reset"&gt;&lt;/td&gt;
    &lt;/tr&gt;
    &lt;/table&gt;
&lt;/form&gt;
</code></pre>

<p>but when I'm giving unmatched entry then also it getting changed.i mean the validate function is not getting called.
plz help</p>

<p>in hope 
robin</p>
