Adding an Execute JavaScript event action

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

  1. 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.
  2. Click the Add New Action icon.
    The Add New Action dialog opens.
  3. 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.
  4. Type JavaScript commands in the JavaScript field and click Finish.

    The JavaScript command action is added. The Add New Action window closes.

  5. From the [objectname] Behavior window, click Apply to apply all actions that have been added for the event.
  6. Click OK to close the [objectname] Behavior window.

Results

You have added an Execute JavaScript event action to an object.