dreamweaver.setDivBackgroundColors()

Availability

Dreamweaver 8.

Description

This function sets the colors used by the Layout Block Backgrounds visual aid.

Arguments

colors

Returns

Nothing.

Example

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