Hello,
I have own composite control inherited from RadWebControl. It contains RadTextBox control where I need handle keyup client event.
I have implemented client class for it and I attached event in initialize function. In dispose function I'm removing this event handler but it causes javascript error:
Here is the script:
Cound you tell me what I have wrong?
Thanks
Jiri
I have own composite control inherited from RadWebControl. It contains RadTextBox control where I need handle keyup client event.
I have implemented client class for it and I attached event in initialize function. In dispose function I'm removing this event handler but it causes javascript error:
Line: 6
Error: '_events' is null or not an object
Here is the script:
nData.KnowledgeManagement.Web.UI.Searcher.prototype =
{
initialize:
function
() {
nData.KnowledgeManagement.Web.UI.Searcher.callBaseMethod(
this
,
'initialize'
);
// SearchTextBox
this
._searchTextBox = $find(
this
.get_id() +
'_searchTextBox'
);
this
._keyUpDelegate = Function.createDelegate(
this
,
this
._keyUp);
$addHandler(
this
._searchTextBox._textBoxElement,
"keyup"
,
this
._keyUpDelegate);
// XmlHttpPanel
this
._xmlHttpPanel = $find(
this
.get_id() +
'_xmlHttpPanel'
);
this
._xmlHttpPanel._searcher =
this
;
this
._xmlHttpPanel.add_responseEnding(
this
._xmlHttpPanelResponseEnding);
this
._xmlHttpPanel.add_responseError(
this
._clientResponseError);
},
dispose:
function
() {
nData.KnowledgeManagement.Web.UI.Searcher.callBaseMethod(
this
,
'dispose'
);
if
(
this
._keyUpDelegate) {
$removeHandler(
this
._searchTextBox._textBoxElement,
"keyup"
,
this
._keyUpDelegate);
this
._keyUpDelegate =
null
;
}
this
._xmlHttpPanel.remove_responseEnding(
this
._xmlHttpPanelResponseEnding);
this
._xmlHttpPanel.remove_responseError(
this
._clientResponseError);
},
_keyUp:
function
() {
this
._search(
this
._searchTextBox._textBoxElement.value);
},
...
}
Cound you tell me what I have wrong?
Thanks
Jiri