Dreamweaver 8.
This function sets the colors used by the Layout Block Backgrounds visual aid.
colors
colors argument, which is required, is an array of strings that contains all the colors, represented as hexadecimal values in the form #RRGGBB. The array must contain 16 colors.
Nothing.
The following example makes sure there are no more than 16 colors specified as div background colors and, if so, sets the colors used as background colors to shades of gray:
var currentDOM = dw.getDocumentDOM();
var divColors = currentDOM.getDivBackgroundColors("divs");
var shadesOfGray = new Array["#000000", "#111111", "#222222", "#333333",¬
"#444444", "#555555", "#666666", "#777777", "#888888", "#999999", ¬
"#AAAAAA", "#BBBBBB", "#CCCCCC", "#DDDDDD", "#EEEEEE", "#FFFFFF"]¬
var howManyColors = divColors.length;
if howManyColors <= 16{
for (var i = 0; i < howManyColors; i++)
{
currentDOM.setDivBackgroundColors("divs", shadeOfGray[i]);
}
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/dreamweaver/8/apiref/17_des38.htm