I need to disable the save button on my form using javascript, if the validation on the page fails. If they don't then it must be enabled used the following code.
Code:
<script language="javascript" type="text/javascript">
function ValidatePage()
{
if (Page_ClientValidate == true)
{
}
else
{
document.getElementById(buttonID).disabled = true;
return false;
}
}
</script>
<asp:Button ID="btnSave" CssClass="button" runat="server" Text="Save"
Width="61px" Height="29px" OnClientClick="ValidatePage();" onclick="btnSave_Click" />