2022.1

Table Of Contents
l The elements that match the selector of a script (see "results" on page1509).
l One element that matches the selector of a script that runs for "Each matched element"
(see "this" on page1425 and "Setting the scope of a script" on page924).
l The elements returned by a query in the template (see "query()" on page1379).
This doesn't remove the elements; to make them visible again, use the function "show()" on
page1462.
These functions are used by the Conditional Script Wizard, as you can see when you open a
Conditional Script and click the Expand button; see "Showing content conditionally" on
page856.
Example
This script hides or shows the elements matched by the selector of the script (which are stored
in the results object), depending on the value of the data field Country in the current record.
if (record.fields["Country"] == "CANADA") {
results.show();
} else {
results.hide();
}
html()
html() : String
Returns the inner HTML of an HTML element, which can be:
l The first element in a set of elements that match the selector of a script (see "results" on
page1509).
l One element that matches the selector of a script that runs for "Each matched element"
(see "this" on page1425 and "Setting the scope of a script" on page924).
l The first element in a set of elements returned by a query in the template (see "query()" on
page1379).
html(value)
Replaces the inner HTML of an HTML element or of each element in a result set with the
supplied value.
value
Page 1410