Assignment
You have two options for assigning JavaScript functions to events for different components.
Proceed as you would for all other action functions and manually create a new action function for a specific event assigned to a specific component.
As a command for this action function, you can now select SCRIPT. In the drop down box, you can see all available functions from your defined JavaScript which
correspond to the pattern. (no parameters or only args parameters)
If, however, you want to use a JavaScript function on several events of different components, there is an easier option.
Open the assignment mask, which you can also access via the Project explorer under “Scripting”/ “JavaScript” / “Assignment”.
The assignment mask is organized into 3 smaller areas:

|
Area 1: |
displays an overview of all the JavaScript functions that can be used as actions. Here, you can select the function which you want to assign to the events.
|
|
Area 2: |
displays the content of the selected functions. Changes at this point are not possible. |
|
Area 3: |
lists pages that are currently open and the components on those pages. Via the context menu (which can be accessed with a right-click), events and functions can be added or deleted. Caution: If an event is deleted at this point, this will affect all action functions assigned to that event. Since, at this point, only script action functions are displayed, it is possible that there are additional action functions, that are not visible here, associated with an event. These will also be lost if the event is deleted. |
To assign several events to a JavaScript function at once, these first have to be selected in Area 1. Then the “Trigger” button can be pressed. The following dialog box will open:
In the top line, the name of the selected function can be seen. Below that is a drop down box showing the events. Depending on which event has been selected, the list of components
in the lower section will change since not all components have the same events. If the event “OnVariableChange” is selected the list will contain all available variables.
To further filter the list, there is a name filter, as well as the option of only showing components that either do or do not already have an assignment.
All components with a check mark have already linked this function to this event. If the check mark is unmarked, the link will be removed when saved.
Of course, new links can also create in reverse.

