Hi,
I have a method defined in RadCodeBlock, when i am trying to call it on page load(by pushing my method in _spBodyOnLoadFunctionNames), i am getting error : The value of the property 'MyMethod' is null or undefined, not a Function object.
(Note: I am using RadComboBox with Sharepoint 2010.)
Below is the scenerio:
ERROR : The value of the property 'GetComboBox' is null or undefined, not a Function object.
I have a method defined in RadCodeBlock, when i am trying to call it on page load(by pushing my method in _spBodyOnLoadFunctionNames), i am getting error : The value of the property 'MyMethod' is null or undefined, not a Function object.
(Note: I am using RadComboBox with Sharepoint 2010.)
Below is the scenerio:
<
telerik:RadCodeBlock
ID
=
"RadCodeBlock"
runat
=
"server"
>
<
script
type
=
"text/javascript"
>
function pageLoad() {
GetComboBox = function () {
var combo = $find("<%= MyRadComboBox.ClientID %>");
return combo;
};
};
</
script
>
</
telerik:RadCodeBlock
>
Method2 = function(){
var combo = GetComboBox(); -->// getting error
// do something
}
var index = ko.utils.arrayIndexOf(_spBodyOnLoadFunctionNames, "Method2");
if( index === -1) {
_spBodyOnLoadFunctionNames.push("Method2");
}
ERROR : The value of the property 'GetComboBox' is null or undefined, not a Function object.