HTML Executable lets you display your own dialog boxes to end users. Dialog boxes are actually HTML pages associated to an HEScript script. You can manage them in the “Application Behavior => Dialog Boxes” page.
Example: click this button to display a blank dialog box:
You will find ready-to-use dialog templates in the “CustomDialogs” subfolder of HTML Executable. You should start writing a custom dialog from the DummyDialog template. This folder also contains a Readme.txt with additional instructions that you should read.
Custom dialogs (HTML pages and scripts) are stored in XML files. HTML Viewer and IE Browser publications do not share the same dialog boxes because their HTML engines are not the same. Consequently, an XML file contains two code versions of the dialog box: one for HTML Viewer publications, and one for IE publications.
When a custom dialog is imported, both the dialog box’s code and its script are added to their respective lists (Dialog Boxes and User Scripts). You are also prompted to provide an identifier for the new dialog box. This identifier is used to invoke the dialog box with scripting.
An identifier for a user-imported dialog box always begins with
user + a unique alphanumeric expression.
A script for a custom dialog box contains script events that are called by form controls like the OK or Cancel buttons:
procedure OnInitialization; is called before the dialog box is shown.
procedure OnShowDialog2; is called when the dialog box is displayed.
IMPORTANT: to close the current dialog box, you should call the
CloseCurrentDialog HEScript function.
To invoke a custom dialog, use the DisplayCustomDialog HEScript function. For instance,
DisplayCustomDialog("dialog identifier", false);
For further details, please see Readme.txt in the “CustomDialogs” subfolder of HTML Executable.
procedure OKDialog; begin // Close the dialog. CloseCurrentDialog; end; procedure OnInitialization; begin // Ensure the <div> named divreg is visible ShowHTMLBlockID("divreg", true); end;
Copyright G.D.G. Software 2016. All rights reserved