Layout view functions

Layout view functions handle operations that change the layout elements within a document. They affect table, column, and cell settings, including position, properties, and appearance.

dom.getClickedHeaderColumn()

Availability

Dreamweaver 4.

Description

If the user clicks a menu button in the header of a table in Layout view and causes the table header menu to appear, this function returns the index of the column that the user clicked. The result is undefined if the table header menu is not visible.

Arguments

None.

Returns

An integer that represents the index of the column.

dom.getShowLayoutTableTabs()

Availability

Dreamweaver 4.

Description

Determines whether the current document shows tabs for layout tables in Layout view.

Arguments

None.

Returns

Returns true if the current document displays tabs for layout tables in Layout view; false otherwise.

dom.getShowLayoutView()

Availability

Dreamweaver 4.

Description

Determines the view for the current document; either Layout or Standard view.

Arguments

None.

Returns

Returns true if the current document is in Layout view; false if the document is in Standard view.

dom.getShowBlockBackgrounds()

Availability

Dreamweaver 8.

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); 
    }

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); 
    }

dom.setShowBlockBackgrounds()

Availability

Dreamweaver 8.

Description

This function turns on and off the visual aid that forces background coloring for all blocks or all divs.

Arguments

allblocks

  • The allblocks argument, which is required, is a Boolean value. Set the value to true to apply background coloring to div tags only. Set the value to false to apply background coloring to all block elements.

Returns

Nothing.

Example

dom.setShowBlockBorders()

Availability

Dreamweaver 8.

Description

This function turns on or off the visual aid that draws borders for all blocks or divs.

Arguments

allblocks

  • The allblocks argument, which is required, is a Boolean value. Set the value to true to apply borders to div tags only. Set the value to false to apply borders to all block elements.

Returns

Nothing.

Example

dom.setShowBlockIDs()

Availability

Dreamweaver 8.

Description

This function turns on or off the visual aid that displays the ID and class for all blocks or divs.

Arguments

allblocks

  • The allblocks argument, which is required, is a Boolean value. Set the value to true to display the ID and class for div tags only. Set the value to false to display the ID and class for all block elements.

Returns

Nothing.

Example

dom.setShowBoxModel()

Availability

Dreamweaver 8.

Description

This function sets the state of the visual aid that colors the full box model for the selected block.

Arguments

None.

Returns

A Boolean value: true if the box model is displayed; false if the box model is not displayed.

Example

dom.setShowLayoutTableTabs()

Availability

Dreamweaver 4.

Description

Sets the current document to display tabs for layout tables whenever it’s in Layout view. This function does not force the document into Layout view.

Arguments

bShow

  • The bShow argument indicates whether to display tabs for layout tables when the current document is in Layout view. If bShow is true, Dreamweaver displays tabs; if bShow is false, Dreamweaver does not display tabs.

Returns

Nothing.

dom.setShowLayoutView()

Availability

Dreamweaver 4.

Description

Places the current document in Layout view if bShow is true.

Arguments

bShow

  • The bShow argument is a Boolean value that toggles the current document between Layout view and Standard view. If bShow is true, the current document is in Layout view; if bShow is false, the current document is in Standard view.

Returns

Nothing.

Get help faster and easier

New user?