Use the Execute JavaScript action
to run JavaScript after the specified event occurs. For example, you
can run JavaScript to open a new window or start the system print
dialog.
About this task
To add an Execute JavaScript event
action to an object:
Procedure
- From the Events view, select the
object in the editor window and double-click the event that you want
to trigger the Execute JavaScript action.
The [objectname] Behavior window
opens.
- Click the Add New Action icon.
The Add New Action dialog opens.
- Select Execute JavaScript in
the actions tree and click Next to open the Execute
JavaScript action parameters page.
Note: To
quickly find the required event action, type the name of the action
in the filter text field.
- Type JavaScript commands in the JavaScript field
and click Finish.
The JavaScript
command action is added. The Add New Action window
closes.
- From the [objectname] Behavior window,
click Apply to apply all actions that have
been added for the event.
- Click OK to close the [objectname]
Behavior window.
Results
You have added an Execute JavaScript event action to an
object.