2022.2

Table Of Contents
Examples
Thisscriptadds20pixelstothewidthandheightofanelement.
var h = results.height();
var w = results.width();
h = h + 20;
w = w + 20;
results.height( h );
results.width( w );
Thefollowingscriptdoesthesame,butinthiscase,marginsareincluded.
var h = results.height(true);
var w = results.width(true);
h = h + 20;
w = w + 20;
results.height( h, true);
results.width( w, true);
hide()
HidesoneormoreHTMLelements,whichcanbe:
l
Theelementsthatmatchtheselectorofascript(see"results"onpage1301).
l
Oneelementthatmatchestheselectorofascriptthatrunsfor"Eachmatchedelement"(see
"this"onpage1237and"Settingthescopeofascript"onpage813).
l
Theelementsreturnedbyaqueryinthetemplate(see"query()"onpage1197).
Thisdoesn'tremovetheelements;tomakethemvisibleagain,usethefunction"show()"onpage1268.
ThesefunctionsareusedbytheConditionalScriptWizard,asyoucanseewhenyouopenaCondi-
tionalScriptandclicktheExpandbutton;see"Showingcontentconditionally"onpage734.
Example
Thisscripthidesorshowstheelementsmatchedbytheselectorofthescript(whicharestoredinthe
resultsobject),dependingonthevalueofthedatafieldCountryinthecurrentrecord.
if (record.fields["Country"] == "CANADA") {
results.show();
} else {
results.hide();
}
Page 1223