I am trying to make it so an ASP:Button doesn't post back and refresh the page.
I have set OnClientClick to return false as the result of the function.
HTML -
<asp:Button ID="englishButton" runat="server" Text="English" OnClientClick="return englishClick();" />
JS -
function englishClick() {
russianButton.style.backgroundColor = "WhiteSmoke";
englishButton.style.backgroundColor = "teal";
hebrewButton.style.backgroundColor = "WhiteSmoke";
englishTable.style.visibility = "visible";
hebrewTable.style.visibility = "hidden";
russianTable.style.visibility = "hidden";
return false;
}
The style changes happen but then the page is immediately refreshed and the style returns to its original state.