2019.2

Table Of Contents
Since the results object also is the result of a query (for elements that match the selector of the
script), it can be passed as context. For example in a script with the selector “table”.
var rows = query("tr", results);
query(html)
Creates a new HTML element on the fly from the provided string of raw HTML, and returns the
new element.
html
A String containing a HTML element. Tags that can contain other elements should be paired
with a closing tag.
Example
The following script adds a paragraph to the results (elements that match the selector of the
script).
results.append("<p>This is a new paragraph.</p>');
Tip
The Dynamic Attachment script uses this function to add an attachment to an Email section; see
"Email attachments" on page537.
Control Script API
The table below lists the objects that are the most important in Control Scripts. Click through to
the object to find a description and sample scripts.
See "Control Scripts" on page885 for information about this kind of scripts, how to insert them
and what you can do with them.
Other objects that are available to Control Scripts
The list below isn't exhaustive: most of the objects listed in the Designer API (see "Standard
Script API" on page1287) are also available in Control Scripts. Not all of those objects can be
used in Control Scripts, however. This is because Control Scripts differ from template scripts
Page 1351