Hi,
I'm trying to disable the button by clicking submit (In order to avoid double-click from the user). Below the code which I'm using:
Since the above javascript function is needed to be used in many pages in the website, and the submit button name may be changed (For example: EditButton, SubmitButton, ChangeButton ....), I'm wonder If it is possible to find the submit button name and to disable it using the above javascript.
Please, I need your help.
Regards,
Bader
I'm trying to disable the button by clicking submit (In order to avoid double-click from the user). Below the code which I'm using:
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"> <script type="text/javascript"> function RequestStart(sender, args) { var submitButton = $get("<%= EditButton.ClientID %>"); submitButton.disabled = true; } </script></telerik:RadCodeBlock<telerik:RadAjaxPanel ID="MainRadAjaxPanel" runat="server" LoadingPanelID="MainRadAjaxLoadingPanel" ClientEvents-OnRequestStart="RequestStart" >....... The form controls ....<asp:Button ID="EditButton" runat="server" Text="Edit" SkinID="NormalButton" OnClick="EditButton_Click" /></telerik:RadAjaxPanel>Since the above javascript function is needed to be used in many pages in the website, and the submit button name may be changed (For example: EditButton, SubmitButton, ChangeButton ....), I'm wonder If it is possible to find the submit button name and to disable it using the above javascript.
Please, I need your help.
Regards,
Bader