Set background colour of script page

Issue
Set background colour of script page

Solution
Add a calculation to the top of the script page

document.body.style.backgroundColor = [BackgroundColor];

Replace [BackgroundColor] with the name, hexidecimal (with lower case "f" letters) or RGB for the color you want the script page background color to be, (which can be a field, variable or call attribute). You will need to make this a used control on every page in order for the color to apply throughout the script.

Example way to set the standard HTML Red colour:
  • Colour Name document.body.style.backgroundColor = 'Red';
  • Hexadecimal document.body.style.backgroundColor = '#ff0000'; <-- note the lower case f letters
  • RGB document.body.style.backgroundColor = 'RGB(255,0,0';


The lower-case f letters in hexadecimal colours is due to how CallScripter substitutes field IDs, ie: F123
Colour Name document.body.style.backgroundColor = '';
Colour Name document.body.style.backgroundColor = '';