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:

  1. Open the Project Setup Station and click Project → Document Definitions....
  2. In the Document Definitions dialog box, select the appropriate Document Definition and click Edit....
  3. 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.

Objects

Sample script to search in a database

12.04.2024 18:16:02

Please leave your feedback about this article

Usage of Cookies. In order to optimize the website functionality and improve your online experience ABBYY uses cookies. You agree to the usage of cookies when you continue using this site. Further details can be found in our Privacy Notice.