2022.2

Table Of Contents
Passing Variable Data to client-side JavaScript
WhenservingWebpagesusingWorkflow,theHTMLisfirstpersonalizedandthenservedtotheweb
browserbyaWorkflowprocess.AtthatstagecustomJavaScriptsdonothaveaccesstotheinform-
ationstoredintheDataModel.Toenableaclient-sidescripttousevariabledata,youneedtocreatea
TextScriptthatproducesaJSONstringandstoresthatintheattributeofanHTMLelement,thevalue
attributeofahiddenfieldforexample.ThecustomJavaScriptcanthenretrievethatinformationand
useittocreatedynamicpageelements.ProducingaJSONstringandstoringtheresultsintheattribute
ofanHTMLelementarebothoptionsintheTextScriptwizard;see"UsingtheTextScriptWizard"on
page729.
StylingandformattingaWebpage
ThecontentsofaWebsectioncanbeformatteddirectly,orstyledwithCascadingStyleSheets(CSS).
See"Stylingandformatting"onpage671and"Stylespane"onpage986.
Inorderforastylesheettobeappliedtoaspecificsection,itneedstobeincludedinthatsection.
Therearetwowaystodothis.
Drag & drop a style sheet
1. ClickandholdthemousebuttononthestylesheetontheResourcespane.
2. MovethemousecursorwithintheResourcespanetothesectiontowhichthestylesheetshould
beapplied.
3. Releasethemousebutton.
Using the Includes dialog
1. OntheResourcespane,right-clickthesection,thenclickIncludes.
2. FromtheFile typesdropdown,selectStylesheets.
3. ChoosewhichCSSfilesshouldbeappliedtothissection.Theavailablefilesarelistedattheleft.
Usethearrowbuttonstomovethefilesthatshouldbeincludedtothelistattheright.
4. YoucanalsochangetheorderinwhichtheCSSfilesareread:clickoneoftheincludedCSSfiles
andusetheUpandDownbuttons.Notethatmovingastylesheetupinthelistgivesitless
weight.Incaseofconflictingrules,stylesheetsreadlaterwilloverridepreviousones.
Note: Stylesheetsareappliedintheorderinwhichtheyareincludedinasection.Thestylesin
eachfollowingstylesheetadduptothestylesfoundinpreviouslyreadstylesheets.Whenstyle
sheetshaveaconflictingruleforthesameelement,classorID,thelaststylesheet‘wins’and
overridestherulefoundinthepreviousstylesheet.
Page 500