> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Web Verification Station のユーザー スクリプト

> ABBYY FlexiCapture Web Verification Station の JavaScript Web カスタム アクションを有効にして作成する方法を説明します。これらはデータ フォーム上の iframe で JSON-RPC 経由で実行されます。

Web Verification Station に表示されるデータ フォームの Web カスタム アクションを有効にするには、次の手順に従います。

1. Project Setup Station を開き、**Project →** Document Definitions.... をクリックします。
2. Document Definitions ダイアログで適切な Document Definition を選択し、Edit.... をクリックします。
3. field properties を開き、Custom Action タブをクリックして、Enable Web Custom Action オプションを選択します。

既存のスクリプトを編集する場合や新しいスクリプトを作成する場合は、上記の手順 1 ～ 3 を実行し、Enable Web Custom Action オプションの横にある Edit... ボタンをクリックします。すると、必要なコードを記述できるスクリプト エディター ウィンドウが開きます。

Web Verification Station で使用するユーザー スクリプトは JavaScript で記述します。Application Server が提供する Web Services API を使用する場合とは異なり、こうしたスクリプトは、ユーザーがデータ フォーム上の対応するボタンをクリックすると、ユーザーのブラウザー ウィンドウ内で直接実行されます。

ユーザー スクリプトは独立した \<iframe> 要素内で実行され、スクリプトの実行完了後にこの要素を閉じる必要があります。Web Verification Station と \<iframe> 要素は、JSON-RPC を使用して postMessage 経由で通信します。

既定では、\<iframe> 要素は検証ウィンドウの \<body> に配置されます。\<iframe> 要素は、文書画像の下にある中央ペインに配置することもできます。これには、スクリプトの 1 行目に次のパスを指定します: // mode: documentEditor.

以下では、Web Verification Station で実行するユーザー スクリプトで使用されるオブジェクト モデルについて説明します。データベース検索を実行するサンプル スクリプトも用意しています。

[オブジェクト](/ja/flexi-capture/appendix/scripts/web-custom-action-functions)

[データベースを検索するサンプル スクリプト](/ja/flexi-capture/appendix/scripts/web-custom-action-db-lookup)
