Event Functions


The core JavaScript library provides several functions for adding and removing events from objects.


Many developers like to create 'clean' HTML that does not have any JavaScript events embedded in the HTML. This provides a nice separation between the HTML layout and the behavior of the HTML page.

The functions in this section describe how you can use JavaScript to attach (i.e. bind) JavaScript code to the various element events in your HTML page.

This methodology is often referred to as 'unobtrusive' JavaScript because the JavaScript which controls the HTML does not clutter up the HTML markup and is kept separate from the HTML.

$e.add Function

Add one or more event listeners to an HTML element.

$e.execute Function

Executes an event for an HTML element, such as a TextBox, Button, or DropdownBox control.

$e.getCoors Function

Returns the x and y coordinates of a click event.

$e.onloaded Function

An optional function that is called after the HTML page has been fully loaded.

$e.remove Function

Remove an event listener on one or more HTML elements.

$e.removeGroup Function

Remove all events with the same group name.

$e.stopEvent Function

Stops an event from bubbling up the hierarchy of elements.

See Also