1.4

Objects
results The HTML element or set of HTML elements that match the selector
specified in the script editor.
record The current record in the main data set.
logger Global object that allows you to log messages.
locale Defines which locale to use.
"formatter" on
page 200
Global object that allows you to format values.
automation Automation properties
merge Merge properties
Global functions
Skin/Formats/CrossReferencePrintFormat("loadhtml() Global function
thatreplaces the content (inner html) of each matched element in the result
set, alternatively load the data into a variable.The location should be an URL
or a relative file path. loadhtml(location)loadhtml(location, selector) Loadhtml()
iscached per batch run (based on the URL) in print/email. loadhtml(location)
Loads allHTML from the HTML file. locationString containing a path that can
be absolute or relative to the section/context. Use: snippets/<snippet-name> to
retrieve the content from a HTML fileresiding in the Snippets folder on the
Resources panel.ExamplesThis script loads a local HTML snippet (from the
Resources panel) directly into the matched elementsresults.loadhtml
("snippets/snippet.html");The following script loads a local HTML snippet
(Resources panel) into a variableThe replaceWith()command is used to
replace the element(s) matched by the script's selector with the contents of the
snippet.var mysnippet = loadhtml('snippets/snippet.html'); results.replaceWith
(mysnippet);Same result as the previous script, but a different
notation:results.replaceWith(loadhtml('snippets/snippet.html'));The following
script loads a snippet into a variable and finds/replaces text in the variable
Loads
HTML
data from
aHTML
(snippet).
The
returned
HTML can
be placed
into a
variable
or into a
set of
HTML
elements.
Page 175