Lets you work with form control events.
Core object
Created by
Event objects are MetaScript objects created in response to events that occur in the course of user interaction with controls on Virtual Ticket forms (for example, in response to button clicks).
Description
Listeners may be registered for form control events; an event listener is a particular function that executes each time a specific type of Event is fired by the form control.
Event objects are designed to allow event listeners registered for form controls in MetaScript 2.0 to access the events that caused them to be executed. Event objects may be accessed within an event listener by having the listener accept the Event as a parameter. To add an event listener, use the addEventListener method of the appropriate form control object (e.g. Button.addEventListener).
Form control events are distinct from form events: form events represent events that affect the entire form (for example, the loading of a Virtual Ticket record for display in the form), while each form control event is local to a particular form control. For information on handling form events, refer to the descriptions of the Form and FormEvent objects.
Property Summary
Property | Description |
---|---|
targetName | A read-only property that represents the ID of the form control for which the event was detected. |
targetObject | A form control object, such as Button, that represents the form control for which the event was detected. |
type | A read-only property that represents the event type: "onclick" - the targetName form control was clicked. |
Method Summary
None