< Day Day Up > |
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.addSpacerToColumn()Availability Dreamweaver 4. Description Creates a 1-pixel-high transparent spacer image at the bottom of a specified column in the currently selected table. This function fails if the current selection is not a table or if the operation is not successful. Arguments colNum
Returns Nothing. dom.createLayoutCell()Availability Dreamweaver 4. Description Creates a layout cell in the current document at the specified position and dimensions, either within an existing layout table or in the area below the existing content on the page. If the cell is created in an existing layout table, it must not overlap or contain any other layout cells or nested layout tables. If the rectangle is not inside an existing layout table, Dreamweaver tries to create a layout table to house the new cell. This function does not force the document into Layout view. This function fails if the cell cannot be created. Arguments left, top, width, height
Returns Nothing. dom.createLayoutTable()Availability Dreamweaver 4. Description Creates a layout table in the current document at the specified position and dimensions, either within an existing table or in the area below the existing content on the page. If the table is created in an existing layout table, it cannot overlap other layout cells or nested layout tables, but it can contain other layout cells or nested layout tables. This function does not force the document into Layout view. This function fails if the table cannot be created. Arguments left, top, width, height
Returns Nothing. dom.doesColumnHaveSpacer()Availability Dreamweaver 4. Description Determines whether a column contains a spacer image that Dreamweaver generated. It fails if the current selection is not a table. Arguments colNum
Returns Returns TRue if the specified column in the currently selected table contains a spacer image that Dreamweaver generated; false otherwise. dom.doesGroupHaveSpacers()Availability Dreamweaver 4. Description Determines whether the currently selected table contains a row of spacer images that Dreamweaver generated. It fails if the current selection is not a table. Arguments None. Returns Returns TRue if the table contains a row of spacer images; false otherwise. 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.isColumnAutostretch()Availability Dreamweaver 4. Description Determines whether a column is set to expand and contract automatically, depending on the document size. This function fails if the current selection is not a table. Arguments colNum
Returns Returns TRue if the column at the given index in the currently selected table is set to autostretch; false otherwise. dom.makeCellWidthsConsistent()Availability Dreamweaver 4. Description In the currently selected table, this function sets the width of each column in the HTML to match the currently rendered width of the column. This function fails if the current selection is not a table or if the operation is not successful. Arguments None. Returns Nothing. dom.removeAllSpacers()Availability Dreamweaver 4. Description Removes all spacer images generated by Dreamweaver from the currently selected table. This function fails if the current selection is not a table or if the operation is not successful. Arguments None. Returns Nothing. dom.removeSpacerFromColumn()Availability Dreamweaver 4. Description Removes the spacer image from a specified column and deletes the spacer row if there are no more spacer images that Dreamweaver generated. This function fails if the current selection is not a table or if the operation is not successful. Arguments colNum
Returns Nothing. dom.setColumnAutostretch()Availability Dreamweaver 4. Description Switches a column between automatically sized or fixed width. If bAutostretch is TRue, the column at the given index in the currently selected table is set to autostretch; otherwise it's set to a fixed width at its current rendered width. This function fails if the current selection isn't a table or if the operation isn't successful. Arguments colNum, bAutostretch
Returns Nothing. 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
Returns A Boolean. 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
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
Returns A Boolean: 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
Returns Nothing. Example See "dom.getShowBlockBackgrounds()" on page 963. 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
Returns Nothing. Example See "dom.getShowBlockBorders()" on page 963. 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
Returns Nothing. Example See "dom.getShowBlockIDs()" on page 964. 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: true if the box model is displayed; false if the box model is not displayed. Example See "dom.getShowBoxModel()" on page 965. 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
Returns Nothing. dom.setShowLayoutView()Availability Dreamweaver 4. Description Places the current document in Layout view if bShow is true. Arguments bShow
Returns Nothing. |
< Day Day Up > |