Unbinds the specified function from the event, so that the function stops receiving notifications when the event fires.
Syntax
object.detachEvent(sEvent, fpNotify)
Parameters
sEvent
Required.
String that specifies any of the standard DHTML Events.
fpNotify
Required.
Pointer that specifies the function previously set using the>attachEvent method.
Return Value
No return value.
Remarks
Behaviors that attach to events using the attachEvent method must explicitly call the detachEvent method to stop receiving notifications from the page when the>ondetach event fires. Behaviors that attach to events using the>PUBLIC:ATTACH element automatically stop receiving notifications when the behavior detaches from the element, and thus do not need to call the detachEvent method.
Example
This example calls the detachEvent method from an HTML Component (HTC) when the highlighting effect is removed from the page, causing the ondetach event to fire.
This feature requires Microsoft® Internet Explorer 5 or later. Click the following icon to install the latest version. Then reload this page to view the sample.
Standards Information
There is no public standard that applies to this method.