hi,
I've a user control and the page that holds it has a Radscriptmgr.
I've the foll js fn:
<script type="text/javascript">
//js function which calls the makeUnselectable().
function OnClientLoad(combobox, args)
{
makeUnselectable(combobox.get_element());
}
//Make all combobox items unselectable to prevent selection in editor being lost
function makeUnselectable(element)
{
var nodes = element.getElementsByTagName('*');
for (var index = 0; index < nodes.length; index++) {
var elem = nodes[index];
elem.setAttribute('unselectable', 'on');
}
}
//js function which isused to get refernce of the client object
function getSelected()
{
//get a reference to Radcombobox client object
var obTagCombo = $find('<%=m_radTagCombo.ClientID %>');
//get_value() returns the value of the control
var value = obTagCombo.get_value();
//get_text()returns the text of the control.
var text = obTagCombo.get_text();
//get a reference to RadEditor client object
var editor = $find("<%=m_radEmailEditor.ClientID%>");
//pasteHtml method is used to paste the contents passed to the editor control.
editor.pasteHtml(text);
}
</script>
and i call it
<input type="button" value="Insert Tag" onclick="getSelected();" />
and in radcombobox: <telerik:RadComboBox ID="m_radTagCombo" OnClientLoad="OnClientLoad" runat="server">
</telerik:RadComboBox>
I need to select text from radcombo and click the insert btn and the selected text from radcombo gets pasted on to the radeditor.
Now, I get a "Microsoft JScript runtime error: 'OnClientLoad' is undefined"
Pls help me with code: