2022.2

Table Of Contents
width(value): void
Setstheouterwidthofthiselement,includingpaddingandborders,excludingmargins.Toincludemar-
gins,callwidth(value, true).
value
Number.Givethewidthinpixels,butwithoutthemeasurementunit(e.g.400,not400px).
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);
this
AStandardscriptorPostPaginationscriptthathasitsscopesetto"Eachmatchedelement"(see"Set-
tingthescopeofascript"onpage373)willbecalledinaloopovertheelementsthatmatchtheselector
ofthescript-theresults(see"results"onpage844).Insuchascript,thisisanobjectofthetype
QueryResult.Itrepresentsthecurrentelementintheloop.
Note: ThescopeofControlScriptscan'tbeset,becausetheydon'thaveaselector.
Example
Iftheselectorofascriptisp.onlyCanada,anditsscopeissetto"Eachmatchedelement",thescript
willberepeatedforallparagraphsthathavetheonlyCanadaclass;itcanaccessonlyoneparagraph
atatime.Thescriptcouldusethistomanipulateeachparagraph,e.g.hideorshowitdependingon
thevalueofadatafieldCountryinthecurrentrecord:
if (record.fields["Country"] == "CANADA") {
this.show();
Page 780