Adds an event to the control and transfer the array of arguments to the handler.
Syntax
ctrl.on(event,handler);
Arguments
event
one of the available event values.
handler
the function performed after the event was fired.
Return value
No return value.
Example
Add the 'click' event to the control using the JavaScript OnLoad event:
ctrl.on('click', function() {
// call the 'setValue' method to set a new value
this.setValue('newValue');
});
See also:
•JavaScript API: Control object > setValue()
•JavaScript API: Control object > clearEvent()
•Example: Show dropdown list of US states if US was selected in country list
•Example: Ask for confirmation before saving a record
•Example: Show order total on the Edit page as the details table is updated
•JavaScript API: Control object