Cancelling all events using javascript
<p>I have a asp link</p>

<pre><code>&lt;asp:LinkButton ID="next" CssClass="Button Large" runat="server" OnClick="Next_Click" OnClientClick="showBillingRequiredState(this)"&gt;Next&lt;/asp:LinkButton&gt;
</code></pre>

<p>When its clicked I want to cancel the page from continue , I want it to just cancel processing if my javascript return false. Right now I am showing an error but then the error dissapears and it doesnt stick.. something is causing it refresh and I lose my error. Here is the javascript, as I mentioned it passes fine through all my conditions and it shows the div, but then after a second it dissapears.</p>

<pre><code> function showrequired(evt) {
        var code = document.getElementById('&lt;%=codelist.ClientID%&gt;').options[document.getElementById('&lt;%=codelist.ClientID%&gt;').selectedIndex].value;
        var currentValue= document.getElementById('&lt;%=statevalue.ClientID%&gt;').value;
        var eDiv = document.getElementById('reqDiv');

        if (code == "US" &amp;&amp; currentValue.trim() == '') {
            eDiv.style.display = 'block';
            return false;
        }
        else {
            eDiv.style.display = 'none';
        }

     }
</code></pre>
