I'm trying to use RadButton as a LinkButton and I'm validating the form using jQuery.validate().
I have the RadButton control set up as a LinkButton and for Single Click.
I'm having a problem where the validation runs and returns appropriate errors, but the button stays disabled. I've tried various approaches to enable the button, with no luck.
Anyone have a solution?
Button markup:
jQuery for the button's click:
I have the RadButton control set up as a LinkButton and for Single Click.
I'm having a problem where the validation runs and returns appropriate errors, but the button stays disabled. I've tried various approaches to enable the button, with no luck.
Anyone have a solution?
Button markup:
<telerik:RadButton ID="OrderButton" runat="server" Text="Order Check Copy" ButtonType="LinkButton" CssClass="css3Grad" ForeColor="White" SingleClick="True" OnClick="OrderButton_Click" BorderStyle="None" SingleClickText="Processing ..... " AutoPostBack="False" UseSubmitBehavior="False"></telerik:RadButton>jQuery for the button's click:
$(document).ready(function (){ $('#<%= OrderButton.ClientID %>').click(function () { $('#aspnetForm').validate({ }); $('#<%=accountNumber.ClientID%>').rules('add', { required: true, messages: { required: ' Required' } }); $('#<%=ckNumLabel.ClientID%>').rules('add', { required: true, messages: { required: ' Required' } }); $('#<%=dateLabel.ClientID%>').rules('add', { required: true, messages: { required: ' Required' } }); $('#<%=amountLabel.ClientID%>').rules('add', { required: true, messages: { required: ' Required' } }); if ($('#aspnetForm').valid() == false) { var btn = $find('<%= OrderButton.ClientID %>'); btn.set_enabled(true); } });});