Javascript function only alert Me
<p>this is my Javascript function for check 2 passwords: </p>

<pre><code>function isPassEquels(){
        var pass1 = document.getElementById("passReg");
        var pass2 = document.getElementById("passConfReg");
        if(pass1!=pass2)
        {
            alert("don't match");

        }
</code></pre>

<p>but this only give me alert message and dont stop servlet to executing . How to stop servlet when i get alert message???</p>
