I have a asp link
<asp:LinkButton ID="next" CssClass="Button Large" runat="server" OnClick="Next_Click" OnClientClick="showBillingRequiredState(this)">Next</asp:LinkButton>
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.
function showrequired(evt) {
var code = document.getElementById('<%=codelist.ClientID%>').options[document.getElementById('<%=codelist.ClientID%>').selectedIndex].value;
var currentValue= document.getElementById('<%=statevalue.ClientID%>').value;
var eDiv = document.getElementById('reqDiv');
if (code == "US" && currentValue.trim() == '') {
eDiv.style.display = 'block';
return false;
}
else {
eDiv.style.display = 'none';
}
}