User Guide
226 Workspace
Example
The following example checks whether the toolbar myEditbar is visible in the document
window, and then stores that value in the
retval variable:
var retval = dom.getToolbarVisibility("myEditbar");
return retval;
dom.setToolbarItemAttribute()
Availability
Dreamweaver MX 2004.
Description
Changes an attribute value for the three image attributes or the tooltip attribute on a toolbar
item.
Arguments
toolbarID, toolbarItemId, attrName, attrValue
■ The toolbarID argument is a string that specifies the ID of the toolbar.
■ The toolbarItemId argument is a string that specifies the ID of the toolbar item.
■ The attrName argument is a string that specifies the name of the attribute to set. Valid
values are '
image', 'overImage', 'disabledImage', or 'tooltip'.
■ The attrValue argument is a string that specifies the value to set.
Returns
Nothing.
Example
The following example calls dom.setToolbarItemAttribute() three times to set the image,
imageOver, and tooltip attributes for the toolbar item MyButton on the toolbar having the
ID
DW_Toolbar_Main:
var dom = dw.getDocumentDOM();
dom.setToolbarItemAttribute('DW_Toolbar_Main', 'MyButton', 'image',
'Toolbars/imgs/newimage.gif');
dom.setToolbarItemAttribute('DW_Toolbar_Main', 'MyButton', 'imageOver',
'Toolbars/imgs/newimageOver.gif');
dom.setToolbarItemAttribute('DW_Toolbar_Main', 'MyButton', 'tooltip', 'One
fine button');
000_DW_API_Print.book Page 226 Wednesday, July 20, 2005 11:58 AM