User Guide
Toolbar functions 203
dom.getToolbarIdArray()
Availability
Dreamweaver MX.
Description
This function returns an array of the IDs of all the toolbars in the application. You can use
dom.getToolbarIdArray() to turn off all toolbars so you can reposition them and make only a
specific set visible.
Arguments
None.
Returns
An array of all toolbar IDs.
Example
The following example stores the array of toolbar IDs in the tb_ids variable:
var tb_ids = new Array();
tb_ids = dom.getToolbarIdArray();
dom.getToolbarItemValue()
Availability
Dreamweaver MX 2004.
Description
Gets the value of the specified toolbar item.
Arguments
toolbarID, itemID
• The toolbarID argument is a string that specifies the ID of the toolbar that contains the item
for which you want a value.
• The itemID argument is a string that specifies the ID of the item for which you want the value.
Returns
A string that represents the value of the toolbar item.
Example
The following example of receiveArguments() is in a toolbar command that controls the
behavior of a Size text field; it gets the value of the Size field as an argument and then reads the
value of the Units field in order to produce a valid value for the CSS property
font-size
function:
receiveArguments(newSize){
var dom = dw.getDocumentDOM();
if (newSize != ""){
dom.applyFontMarkupAsStyle('font-size', newSize +
dom.getToolbarItemValue("DW_Toolbar_Text","DW_Text_Units"));
}
000_DW_API_Print.book Page 203 Wednesday, August 20, 2003 9:14 AM