JavaScript

$e.remove Function

Syntax

$e.remove(ele as object|string|array, type as string, eventListener as function)

Arguments

eleobject|string|array

An HTML element, an ID or NAME, or an array of HTML elements, IDs, and/or NAMEs.

typestring

The type of event. See $e.add for a list of event types.

eventListenerfunction

The Javascript function that was linked to the event.

Description

Remove an event listener on one or more HTML elements.

Discussion

The $e.remove() function allows you to remove an event on a single or multiple HTML elements.

Example

//Assume that the $e.add() function had been previously called to add the 'validate1()' function to the 'on blur' event for the 'firstname' control.</x>
$e.remove('firstname','blur',validate1);

//Assume that the 'validate1()' function had been bound to multiple controls.
$e.remove(['firstname','lastname'],'blur',validate1);
This function only removes event handlers that were added using the $e.add() function. It cannot remove event handlers that are specified in the HTML markup.
Use {dialog.object}.getPointer() to get the DOM element for a control.

See Also