2021.1

Table Of Contents
3. From the File types dropdown, select JavaScripts.
4. The available JavaScript files are listed at the left. Use the arrow buttons or double-click
to move the JavaScript files that should be included to the right-hand list. Using the Up
and Down buttons or drag-and-drop you can change the order of the files, too.
5. Click OK.
Note
JavaScript files that are linked to (i.e. included in) a section show a chain icon in the
Resources pane (see "Resources pane" on page1059).
Note
Any JavaScript files included in a section run after the scripts in the Scripts pane.
Using JavaScript in other contexts
Email clients do not support JavaScript. Therefore, Email contexts cannot include JavaScript
resources.
When a JavaScript file is included in a Print section, the Designer itself acts as the browser.
When generating Print output, it runs the JavaScript after generating the main page flow
contents and the pagination, but before any Master Pages are added. So it is possible to
change Print output (except content on Master Pages) by a JavaScript; for example, to add a
barcode that includes the page number to each document. A warning is appropriate, however:
changing the Print output may change the page flow and doing so at this point may result in
bad output and/or serious errors or a crash of the software.
Previewing a template with JavaScript resources
When a section is previewed in the Designer, scripts in the Resources pane are interpreted by
an internal browser.
JavaScript resources included in a Web section are only executed on the Live tab, not on the
Preview tab.
Remember that the final output of a Web section is eventually processed by a client browser.
Page 561