User Guide

224 Workspace
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"));
}
else{
dom.removeFontMarkupAsStyle('font-size');
}
}
000_DW_API_Print.book Page 224 Wednesday, July 20, 2005 11:58 AM