Dom.getshowblockids(), Dom.getshowboxmodel() – Adobe Dreamweaver API Reference CS5 User Manual
Page 419

414
DREAMWEAVER API REFERENCE
Design
Last updated 8/27/2013
dom.getShowBlockIDs()
Availability
Dreamweaver 8.
Description
This function gets the state of the visual aid that displays ID and class information for all blocks or divs.
Arguments
allblocks
•
The allblocks argument, which is required, is a Boolean value. Set the value to
true
to display ID and class for div
tags only. Set the value to
false
to display the ID and class for all block elements.
Returns
A Boolean value: If
true
, IDs are displayed; if
false
IDs are not displayed.
Example
The following example checks whether the block IDs are displayed and, if not, displays them:
var currentDOM = dw.getDocumentDOM();
if (currentDOM.getShowBlockIDs(false) == false){
currentDOM.setShowBlockIDs(true);
}
dom.getShowBoxModel()
Availability
Dreamweaver 8.
Description
This function turns on and off the visual aid that colors the full box model for the selected block.
Arguments
None.
Returns
Nothing.
Example
The following example checks whether the full box model for the selected box is displayed in color, and, if not, colors it:
var currentDOM = dw.getDocumentDOM();
if (currentDOM.getShowBoxModel() == false){
currentDOM.setShowBoxModel(true);
}