Dom.getshowblockborders() – Adobe Dreamweaver API Reference CS5 User Manual
Page 418
413
DREAMWEAVER API REFERENCE
Design
Last updated 8/27/2013
Description
This function gets the state of the visual aid that forces background coloring for all blocks or divs.
Arguments
allblocks
•
The allblocks argument, which is required, is a Boolean value. Set the value to
true
to apply to div tags only. Set the
value to
false
to apply to all block elements.
Returns
A Boolean value. If
true
, backgrounds are being forced; if
false
, backgrounds are not being forced.
Example
The following example checks whether the background coloring for all blocks is being forced, and if not, forces
background coloring for all blocks.:
var currentDOM = dw.getDocumentDOM();
if (currentDOM.getShowBlockBackgrounds(false) == false){
currentDOM.setShowBlockBackgrounds(false);
}
dom.getShowBlockBorders()
Availability
Dreamweaver 8.
Description
This function gets the state of the visual aid that draws borders for all blocks or all divs.
Arguments
allblocks
•
The allblocks argument, which is required, is a Boolean value. Set the value to
true
to get the state for div tags only.
Set the value to
false
to get the state for all block elements.
Returns
A Boolean value; if
true
, borders are displayed; if
false
, borders are not displayed.
Example
The following example checks whether the block borders visual aid is on and, if not, turns it on:
var currentDOM = dw.getDocumentDOM();
if (currentDOM.getShowBlockBorders(false) == false){
currentDOM.setShowBlockBorders(true);
}