Hi there.
I have a custom control that has the following prototype.
Type.registerNamespace('Demo');
Demo.CustomTextBox = function(element) {
Demo.CustomTextBox.initializeBase(this, [element]);
}
Demo.CustomTextBox.prototype = {
initialize: function() {
Demo.CustomTextBox.callBaseMethod(this, 'initialize');
this._onblurHandler = Function.createDelegate(this, this._onBlur);
$addHandlers(this.get_element(),
{
'blur': this._onBlur
},
this);
},
dispose: function() {
$clearHandlers(this.get_element());
Demo.CustomTextBox.callBaseMethod(this, 'dispose');
},
_onBlur: function(e) {
if (this.get_element() && !this.get_element().disabled) {
alert(this.get_element().value);
}
}
}
Demo.CustomTextBox.registerClass('Demo.CustomTextBox', Sys.UI.Control);
if (typeof (Sys) !== 'undefined') Sys.Application.notifyScriptLoaded();
How can i raise a post back event to the server in the _onBlur method?
Cheers
Rohan