2018.2

Table Of Contents
hide()
Hides the elements in a set. This doesn't remove the elements; to make them visible again, use
the function "show()" on page1135.
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
page711.
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 the first element in this result set.
html(value)
Replaces the inner HTML of each element in this result set by the supplied value.
value
A String that may contain HTML tags.
Examples
The following script loads part of a snippet based on the value of a field, and then inserts the
content into the document using html().
var promoTxt = loadhtml('snippets/promo-en.html', '#' +
record.fields['YOGA']);
results.html(promoTxt);
Page 1127