Specifications

To o l b a r s 99
receiveArguments()
Description
Processes any arguments that are passed from a toolbar item. The receiveArguments() function
is equivalent to the
command attribute in a toolbar item tag.
Arguments
For pop-up menus, combo boxes, text boxes, and color pickers, the first argument is the current
value within the control. The
getDynamicContent() command can optionally attach individual
IDs to items within a pop-up menu. If the selected item in the pop-up menu has an ID attached,
Dreamweaver passes that ID to
receiveArguments() instead of the value. For combo boxes, if
the current contents of the text box do not match an entry in the pop-up menu, Dreamweaver
passes the contents of the text box. To determine whether the text box matches, Dreamweaver
compares against the pop-up menu without case-sensitivity.
If you specified the
arguments attribute, those arguments are passed next. If you did not specify
the
arguments attribute, Dreamweaver passes the ID of the item.
Returns
Dreamweaver expects nothing.
Example
function receiveArguments(newTitle)
{
var dom = dw.getDocumentDOM();
if (dom)
dom.setTitle(newTitle);
}
showIf()
Description
Specifies that an item appears on the toolbar only if the function returns true. For example, you
could use
showIf() to show certain buttons only when the page has a certain server model. If
showif() is not defined, the item always appears. The showIf() function is the same as the
showIf attribute in a toolbar item tag.
The
showIf() function is called whenever the items enabler runs; that is, according to the value
that
getUpdateFrequency() returns.
Arguments
None.
Returns
Dreamweaver expects a Boolean value that indicates whether the item will show.