Table editing functions

Table functions add and remove table rows and columns, change column widths and row heights, convert measurements from pixels to percents and back, and perform other standard table‑editing tasks.

dom.convertWidthsToPercent()

Availability

Dreamweaver 3.

Description

This function converts all WIDTH attributes in the current table from pixels to percentages.

Arguments

None.

Returns

Nothing.

dom.convertWidthsToPixels()

Availability

Dreamweaver 4.

Description

This function converts all WIDTH attributes in the current table from percentages to pixels.

Arguments

None.

Returns

Nothing.

dom.decreaseColspan()

Availability

Dreamweaver 3.

Description

This function decreases the column span by one.

Arguments

None.

Returns

Nothing.

Enabler

dom.decreaseRowspan()

Availability

Dreamweaver 3.

Description

This function decreases the row span by one.

Arguments

None.

Returns

Nothing.

Enabler

dom.deleteTableColumn()

Availability

Dreamweaver 3.

Description

This function removes the selected table column or columns.

Arguments

None.

Returns

Nothing.

Enabler

dom.deleteTableRow()

Availability

Dreamweaver 3.

Description

This function removes the selected table row or rows.

Arguments

None.

Returns

Nothing.

Enabler

dom.doDeferredTableUpdate()

Availability

Dreamweaver 3.

Description

If the Faster Table Editing option is selected in the General preferences, this function forces the table layout to reflect recent changes without moving the selection outside the table. This function has no effect if the Faster Table Editing option is not selected.

Arguments

None.

Returns

Nothing.

dom.getShowTableWidths()

Availability

Dreamweaver MX 2004, and updated in CS4.

Description

Returns whether table widths appear in standard or expanded tables mode. For information on whether Dreamweaver displays table tabs in Layout mode, see dom.getShowLayoutTableTabs().

Arguments

None.

Returns

A Boolean value: true if Dreamweaver shows table widths in standard or expanded tables mode; false otherwise.

dom.getTableExtent()

Availability

Dreamweaver 3.

Description

This function gets the number of columns and rows in the selected table.

Arguments

None.

Returns

An array that contains two whole numbers. The first array item is the number of columns, and the second array item is the number of rows. If no table is selected, nothing returns.

dom.increaseColspan()

Availability

Dreamweaver 3.

Description

This function increases the column span by one.

Arguments

None.

Returns

Nothing.

Enabler

dom.increaseRowspan()

Availability

Dreamweaver 3.

Description

This function increases the row span by one.

Arguments

None.

Returns

Nothing.

Enabler

dom.insertTableColumns()

Availability

Dreamweaver 3.

Description

This function inserts the specified number of table columns into the current table.

Arguments

numberOfCols, bBeforeSelection

  • The numberOfCols argument is the number of columns to insert.

  • The bBeforeSelection argument is a Boolean value: true indicates that the columns should be inserted before the column that contains the selection; false otherwise.

Returns

Nothing.

Enabler

dom.insertTableRows()

Availability

Dreamweaver 3.

Description

This function inserts the specified number of table rows into the current table.

Arguments

numberOfRows, bBeforeSelection

  • The numberOfRows argument is the number of rows to insert.

  • The bBeforeSelection argument is a Boolean value: true indicates that the rows should be inserted above the row that contains the selection; false otherwise.

Returns

Nothing.

Enabler

dom.mergeTableCells()

Availability

Dreamweaver 3.

Description

This function merges the selected table cells.

Arguments

None.

Returns

Nothing.

Enabler

dom.removeAllTableHeights()

Availability

Dreamweaver 3.

Description

This function removes all HEIGHT attributes from the selected table.

Arguments

None.

Returns

Nothing.

dom.removeAllTableWidths()

Availability

Dreamweaver 3.

Description

This function removes all WIDTH attributes from the selected table.

Arguments

None.

Returns

Nothing.

dom.removeColumnWidth()

Availability

Dreamweaver MX 2004.

Description

This function removes all WIDTH attributes from a single, selected column.

Arguments

None.

Returns

Nothing.

dom.selectTable()

Availability

Dreamweaver 3.

Description

Selects an entire table.

Arguments

None.

Returns

Nothing.

Enabler

dom.setShowTableWidths()

Availability

Dreamweaver MX 2004, updated in CS4.

Description

Toggles the display of table widths on and off in standard or Expanded Tables mode. This function sets the value for the current document and any future document unless otherwise specified. For information on setting the display of table tabs in Layout mode, see dom.setShowLayoutTableTabs().

Arguments

bShow

  • The bShow is a Boolean argument that indicates whether to display table widths for tables when the current document is in Standard or Expanded Tables mode. If bShow is true, Dreamweaver displays the widths. If bShow is false, Dreamweaver does not display the widths.

Returns

Nothing.

dom.setTableCellTag()

Availability

Dreamweaver 3.

Description

This function specifies the tag for the selected cell.

Arguments

tdOrTh

  • The tdOrTh argument must be either "td" or "th".

Returns

Nothing.

dom.setTableColumns()

Availability

Dreamweaver 3.

Description

This function sets the number of columns in the selected table.

Arguments

numberOfCols

  • The numberOfCols argument specifies the number of columns to set in the table.

Returns

Nothing.

dom.setTableRows()

Availability

Dreamweaver 3.

Description

This function sets the number of rows in the selected table.

Arguments

numberOfCols

  • The numberOfRows argument specifies the number of rows to set in the selected table.

Returns

Nothing.

dom.showInsertTableRowsOrColumnsDialog()

Availability

Dreamweaver 3.

Description

This function opens the Insert Rows or Columns dialog box.

Arguments

None.

Returns

Nothing.

Enabler

dom.splitTableCell()

Availability

Dreamweaver 3.

Description

This function splits the current table cell into the specified number of rows or columns. If one or both of the arguments is omitted, the Split Cells dialog box appears.

Arguments

{colsOrRows}, {numberToSplitInto}

  • The colsOrRows argument, which is optional, must be either "columns" or "rows".

  • The numberToSplitInto argument, which is optional, is the number of rows or columns into which the cell will be split.

Returns

Nothing.

Enabler

Get help faster and easier

New user?