Overview: What Are Event Actions?
The actions available are:
Note that many of the actions above are already running FileMaker scripts: when you drag and event to edit it, for example, a FileMaker script makes that edit. So in most cases you'll want to turn on the FileMaker script debugger and edit or branch the FileMaker script that is already being called. (Here's how we do that: movie.)
Enabling Event Actions
Event actions were introduced as an in-app update in version 10.42
Each source can have its own Event Actions and you'll specify them in the script "Load Source Settings at Startup --- Describe Your Sources Here ---". Find the comment "Event actions for WebViewer events..." at about line 32 and add your action in the SetVariable line that follows. Here is what that SetVariable calc looks like if we're adding an On Event Hover action to show a tooltip:
Each action has four elements:
Your event actions have access to the event in which they are running and you may want to reference fields from that event in your action. In the tooltip example above, you'll see the title of the event referenced as event.title. That's the under-the-hood name for the event title.
What kinds of JS objects and methods are availble?
Check this out: ActionObjects.