2018.2

Table Of Contents
String containing a path that can either be a URL or a path that is relative to the
section/context.
In order to retrieve files from outside the template the file protocol is supported as well as the
http/https protocols.
The complete syntax of a fully qualified URL with the "file" protocol is: file://<host>/<path>. If
the host is "localhost", it can be omitted, resulting in file:///<path>, for example:
file:///c:/somefolder/somecontent.js.
Examples
This script loads a JavaScript file (from the Resources pane) directly into a <script> element.
var js = loadtext("js/my-script.js");
results.append(query("<script>").text(js));
The following script loads a style sheet (from the Resources pane) into the <style> element.
var css = loadtext("css/my-styles.css");
results.append(query("<style type='text/css'>").text(css));
Number functions
Note
The locale also influences the output of some Number functions; see "Locale" on page685.
Tip
For fields that contain a number, you can also enter a formatting pattern via the Text Script Wizard;
see "Using the Text Script Wizard" on page704, "Formatting variable data" on page708 and
"Number patterns" on the facing page).
currency(value)
Formats a number as an amount of money. Which currency symbol and which thousands
separator are used depends on the Locale; see "Locale" on page685.
value
Page 1155