Dialog Boxes

Applies to HTML Viewer, IE Browser publications.

Introducing dialog boxes

All dialog boxes displayed by publications and ebooks are actually HTML pages acting as custom HTML dialogs. Among dialog boxes you can find the Search engine panel, the About dialog box, error pages, favorite manager, etc…

Because you may want to customize the contents of these dialog boxes, you can edit their HTML code.

However, please note that you should never modify the scripts or the forms inside these dialog boxes. In fact, these pages are also managed by internal scripts that control how the publication works.

HTML Viewer and IE Browser publications do not share the same dialog box codes because their HTML engines are not the same.

HTML code for dialog boxes is encoded in UTF-8 format, for Unicode support.

Some dialog boxes contain items added at runtime by the publication (like Favorite Manager, Add Favorites, Search Results…). You can customize these items with the dedicated resource strings: for instance, see the resource strings that lets you customize search results.

Dialog boxes use resource strings called “Strings for dialog boxes” for easier localization. All references to these strings are directly replaced when HTML Executable compiles the ebook. To insert a reference to a string for a dialog box, use this syntax: [#ID] where ID is the id of the string (IDs always begin with Y); example: [#YAbout] will be replaced by the value of “YAbout” which is “About”.

Modifying dialog boxes

To edit a dialog box, select it in the list and click Edit (or double-click). The internal HTML editor will appear. Press OK to save your changes. It is your responsibility to check whether the pages work fine once modified.

To import/export a dialog box, select it in the list and press XML Tools. Then select Import/Export and you will be prompted to enter the filename for the XML file. Pages are stored as CDATA items in the XML format so you can edit them with any XML editor (or even Notepad if you wish). When you import a dialog box, the existing one is overwritten without any prompt.

If you have made several modifications to dialog boxes and you would like to use them in other HTML Executable projects, you can export all dialog boxes to a Template file. Template files are files with .HESP extension. You can import and export dialog boxes with the Templates button.

Templates are designed for exporting and importing all dialog boxes. If you want to export one dialog box only, use the XML Tools.

When you start a new project, HTML Executable loads initial dialog boxes from the template file named hedlgtemplate.hesp and available in the installation folder of HTML Executable. If you want to use your modified dialog boxes for each new project you create, replace this hedlgtemplate.hesp file with yours or indicate your preferred default template file in the Environment Options.

By default, dialog boxes can be resized by end users. If you want to avoid this, please add the following meta tag to the HEAD section of the system HTML page’s code:

<meta name="WindowNoResize" content="1">

To import your own custom HTML dialogs, select an existing item and click XML Tools / Import page from XML. You will find dialog templates in the “CustomDialogs” subfolder of HTML Executable. Once a custom dialog is imported, it will appear in the list. You can remove it later using the Remove button. Note that internal dialog boxes cannot be removed: only the ones you imported.

Learn more about custom HTML dialogs.


Copyright G.D.G. Software 2016. All rights reserved