2022.2

Table Of Contents
Note: TotargetsectionsaswellasMasterPages,usethebodyselectorwithoutthemas-
terpageorsectionselector.Forexample:
l
Selector:body
l
Script:results.html('<div style-
e="background:red;width:1in;height:2in">Hello World</-
div>');
Inversionspriorto2019.2thesectionselectorwouldworkonsectionsaswellasMaster
Pages.Asofversion2019.2thisisnolongerthecase.Thesectionselectornowonlyselects
sections.
Master Page selector
TheDesignerwritesthenameofeachMasterPagetothemasterpageattributeofthe<html>ele-
ment.Thisattributecanbeusedinselectors.
Example: ThisscriptaddsaboxtothebodyofeveryMasterPage.
l
Selector:[masterpage] body
l
Script:results.html('<div style-
e="background:red;width:1in;height:2in">Hello World</-
div>');
ThefollowingscriptaddstheboxonlytotheMasterPagecalled"MasterPage1".
l
Selector:[masterpage="Master page 1"] body
l
Script:results.html('<div style-
e="background:red;width:1in;height:2in">Hello World</-
div>');
Sheet position selectors
InPrintoutput,pageshaveasheetpositionthatdependsontheoptionssetinthe"SheetConfiguration
dialog"onpage939(e.g.theDuplexandAllowContentOnoptions).Connectgiveseachpage-or
rather,the"MediaBox"divelementonthatpage-aclassdependingontheirsheetposition:
Page 827