Prev | Current Page 541 | Next

Rob Cameron and Dale Michalk

"Pro ASP.NET 3.5 Server Controls and AJAX Components"

get_events().removeHandler('hover', handler);
},
// Bind and unbind to unhover event.
add_unhover: function(handler)
{
this.get_events().addHandler('unhover', handler);
},
remove_unhover: function(handler)
{
this.get_events().removeHandler('unhover', handler);
},
// Release resources before control is disposed.
dispose: function()
{
var element = this.get_element();
if (this._clickDelegate)
{
Sys.UI.DomEvent.removeHandler(element, 'click', this._clickDelegate);
delete this._clickDelegate;
}
if (this._hoverDelegate)
{
Sys.UI.DomEvent.removeHandler(element, 'focus', this._hoverDelegate);
Sys.UI.DomEvent.removeHandler(element, 'mouseover',
this._hoverDelegate);
delete this._hoverDelegate;
}
CHAPTER 9 ?–  A SP.NET A JAX C ONTROLS AND EXTENDERS 425
if (this._unhoverDelegate)
{
Sys.UI.DomEvent.removeHandler(element, 'blur', this._unhoverDelegate);
Sys.UI.DomEvent.removeHandler(element, 'mouseout',
this._unhoverDelegate);
delete this._unhoverDelegate;
}
ControlsBook2Lib.Ch09.HoverButton.callBaseMethod(this, 'dispose');
},
initialize: function()
{
var element = this.get_element();
if (!element.tabIndex) element.tabIndex = 0;
if (this._clickDelegate === null)
{
this._clickDelegate = Function.createDelegate(this, this.


Pages:
529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553