I have a RadGrid and a button that loads the grid based on a search string, and use the loading panel when the user hits the search button. I have a javascript function validate() on the button to validate if use enters search criteria, if I remove this javascript function from the button, the loading panel works fine. But if I add this function nothing happens when clicking search button even though the function return true.
the code is as below:
Does it support client script button or what could be wrong.
Please help. Thanks.
the code is as below:
function validate() { if (document.getElementById("<%=txtQueryText.ClientID%>").value == "") { alert("Please enter search keyword!"); document.getElementById("<%=txtQueryText.ClientID%>").focus(); return false; } else return true; } <AjaxSettings> <telerik:AjaxSetting AjaxControlID="BtnSearch"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="RadGridResults" LoadingPanelID="RadAjaxLoadingPanel1"/> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings><asp:Button ID="btnSearch" runat="server" Text="<%$ Resources:GUI,Button.Search %>" OnClick="btnSearch_Click" OnClientClick="return validate()" />Does it support client script button or what could be wrong.
Please help. Thanks.