1.6

Table Of Contents
Function Description
the next page
size() Gets the number of elements in this result set. Equivalent to the length
property.
"text()" below Replaces the textcontentof an HTML element or of each element in a set
of HTML elements with the supplied value, or returns the text content of
the first element if no value is supplied.
show()
Shows the elements in a set. To hide elements (again), use the function "hide()" on page455.
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
page217.
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();
}
text()
text() : String
Returns the text content of the first element in a result set.
Example
This script loads a snippet into a variable and retrieves an element from the snippet using query
() and text().
Page 475