I am having a problem where the first RadButton on a webform fires on Page_Load (without being clicked at all).
I have read other similar threads, but they all say to delete the () after the function name in the OnClientClicked property...I have done this and it makes no difference what so ever. The button OnClientClicked event always fires --- except after the page is loaded, then the OnClientClicked event NEVER fires).
I have keyed and rekeyed the property numerous times and it always screws up. What should I do?
The buttons definitions and the javascript are provided below. Thanks in advance for any help!
BUTTON DEFINITIONS
JAVASCRIPT FUNCTION
I have read other similar threads, but they all say to delete the () after the function name in the OnClientClicked property...I have done this and it makes no difference what so ever. The button OnClientClicked event always fires --- except after the page is loaded, then the OnClientClicked event NEVER fires).
I have keyed and rekeyed the property numerous times and it always screws up. What should I do?
The buttons definitions and the javascript are provided below. Thanks in advance for any help!
BUTTON DEFINITIONS
<
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"
/>
<
telerik:RadButton
ID
=
"CloseMe"
runat
=
"server"
Text
=
"Close Window"
CausesValidation
=
"False"
ToolTip
=
"Closes this window."
UseSubmitBehavior
=
"false"
OnClientClicked
=
"closemenow"
/>
JAVASCRIPT FUNCTION
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();
}