A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.dhtmlx.com/suite/form/handling_events/ below:

JavaScript Form - Event Handling

Event handling Attaching event listeners​

You can add any handler to the events of Form. To do this, use the form.events.on() method with the following parameters:

evName name of the event evHandler user-defined event handler
form.events.on("click", function(name,e){
console.log(id);
});

Several handlers can be attached to one and the same event, and all of them will be executed.

Related sample: Form. Events

note

The names of the events are case-insensitive.

Detaching event listeners​

There is a simple way of removing an event handler with the form.events.detach() method:

form.events.on("click", function(name,e){
console.log(id);
});

form.events.detach("click");
Calling events​

A custom event can be called with the fire() method of the events module:

form.events.fire(evName,[args]);
List of supported events​

You can find the full list of Form events in the API section.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4