User scripts for the Web Verification Station
To enable a web custom action for the data form displayed on the Web Verification Station, follow these steps:
- Open the Project Setup Station and click Project → Document Definitions....
- In the Document Definitions dialog box, select the appropriate Document Definition and click Edit....
- Open the field properties, click the Custom Action tab, and select the Enable Web Custom Action option.
To edit an existing script or to create a new one, complete steps 1 through 3 above and click the Edit... button next to the Enable Web Custom Action option. This will open a Script Editor window, where you can write the required code.
User scripts intended for use on the Web Verification Station are written in JavaScript. As opposed to using the Web Services API provided by the Application Server, such scripts will be run directly in the user's browser window when the user clicks the corresponding button on the data form.
A user script will be run in a separate <iframe> element, which must be closed after the script has been completed. The Web Verification Station and the <iframe> element communicate via postMessage using JSON-RPC.
By default, the <iframe> element is positioned in the <body> of the verification window. You can also place the <iframe> element in the central pane beneath the document image. To do this, specify the following path in the first line of the script: // mode: documentEditor.
See below for a description of the object model used for user scripts to be run on the Web Verification Station. We also provide a sample script that carries out a database search.
12.04.2024 18:16:02