I have having a consistently wrong issue with the RadButton...When the web form is loaded, the OnClientClicked event is executing but the JavaScript fails because it can't find the function. This is actually two (2) errors -- first the OnClientClicked event should NOT be firing and second, the javascript function it appears to be looking for is present in the code.
I have read other similar threads and they all say to remove the () after the function name in the OnClientClicked event property -- but I have done that repeatedly. The button definition, the javascript function, and a screen capture of the javascript error are all included.
I have read other similar threads and they all say to remove the () after the function name in the OnClientClicked event property -- but I have done that repeatedly. The button definition, the javascript function, and a screen capture of the javascript error are all included.
<
telerik:RadButton
ID
=
"CreateNew"
runat
=
"server"
Text
=
"Create New"
CausesValidation
=
"False"
ToolTip
=
"Displays a form for adding a new Master Agent Billing set to the database."
UseSubmitBehavior
=
"false"
OnClick
=
"CreateNew_Click"
OnClientClicked
=
"makeNew"
/>
function
makeNew(sender, eventArgs) {
document.getElementById(
'<%= HiddenField1.ClientID%>'
).value = "myTarget;
document.getElementById(
'<%= K.ClientID%>'
).value =
"0"
;
document.getElementById(
'<%= KI.ClientID%>'
).value =
"0"
;
document.getElementById(
'<%= KII.ClientID%>'
).value =
"0"
;
document.getElementById(
'<%= M.ClientID%>'
).value =
"N"
;
document.getElementById(
'<%= MI.ClientID%>'
).value =
"N"
;
document.getElementById(
'<%= MII.ClientID%>'
).value =
"N"
;
document.forms[
"form1"
].submit();
}