Hi I have a button that I want to disable on click and then run the code behind on the button. The following is the code I have but the code behind click event never fires. The button gets disabled but OnClick event never fires.
Thank you for you assistance.
Tracy
<
script
type
=
"text/javascript"
>
function AddJob(sender, args) {
sender.set_enabled(false);
sender.click();
}
</
script
><
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
act:ToolkitScriptManager
ID
=
"tsmManager"
runat
=
"server"
EnablePartialRendering
=
"true"
AsyncPostBackTimeOut
=
"600"
ScriptMode
=
"Release"
EnablePageMethods
=
"true"
/>
<
div
>
<
telerik:RadButton
ID
=
"rbtAddJob"
runat
=
"server"
AutoPostBack
=
"true"
ButtonType
=
"StandardButton"
Text
=
"Add This Job To My Jobs"
OnClientClicked
=
"AddJob"
OnClick
=
"rbtAddJob_Click"
Width
=
"150px"
/>
</
div
>
Protected Sub rbtAddJob_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles rbtAddJob.Click
MsgBox("test")
End Sub
I also tried this code
<
script
type
=
"text/javascript"
>
function AddJob(sender, args) {
var btn = $find("rbtAddJob");
btn.set_enabled(false);
btn.click();
}
</
script
>