Putting the javascript function on the parent page instead of the user control seems contrary to the object oriented fundament of encapsulation.
That being said, how can a javascript function be recognized on the user control?
Currently, I am having an issue where a client side event on a user control is firing, but producing the error '<function name> is undefined.
here's the code snippet;
<
telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
<
script type="text/javascript">
function OnClientLoad(editor, args) {
var element = document.all ? editor.get_document().body : editor.get_document();
$telerik.addExternalHandler(element,
"blur", function(e) {
alert(
'You just clicked in the editor');
});
}
function
OnBlurNetWeight() {
window.alert(
'Here');
}
</
script>
</
telerik:RadCodeBlock>
<telerik:RadNumericTextBox ID="rntNetKilos" Width="85px" Runat="server" >
<ClientEvents OnBlur="OnBlurNetWeight" />
</telerik:RadNumericTextBox>
Produces a javascript error 'OnBlurNetWeight' is undefined.