The user selects options in the dialog box. Dreamweaver executes event handlers that are
9
associated with the fields as the user encounters them.
The user clicks one of the buttons that are defined by the
10
Dreamweaver executes the code that is associated with the clicked button.
11
The dialog box remains visible until one of the scripts in the Menu Commands calls the
12
window.close()
The Menu Commands API
The custom functions in the Menu Commands API are not required.
canAcceptCommand()
Description
Determines whether the menu item is active or dimmed.
Arguments
{arg1}, {arg2},...{argN}}
•
If it is a dynamic menu item, the unique ID that the
specifies is the only argument. Otherwise, if the
tag, the value of that attribute passes to the
isCommandChecked(), receiveArguments(), and
arguments. The
call the same menu command.
Note: The
arguments
Returns
Dreamweaver expects a Boolean value:
commandButtons()
Description
Defines the buttons that appear on the right side of the Options dialog box and their behavior
when they are clicked. If this function is not defined, no buttons appear, and the
the Menu Commands file expands to fill the entire dialog box.
Arguments
None.
Returns
Dreamweaver expects an array that contains an even number of elements. The first element is a
string that contains the label for the topmost button. The second element is a string of JavaScript
code that defines the behavior of the topmost button when it is clicked. The remaining elements
define additional buttons in the same manner.
156
Chapter 8: Menus and Menu Commands
function.
attribute is useful for distinguishing between two menu items that
arguments
attribute is ignored for dynamic menu items.
true
commandButtons()
getDynamicContents()
attribute is defined for a
arguments
canAcceptCommand()
setMenuText()
if the item should be enabled;
function.
function
menuitem
function (and to the
functions) as one or more
otherwise.
false
section of
BODY
Need help?
Do you have a question about the DREAMWEAVER MX 2004-EXTENDING DREAMWEAVER and is the answer not in the manual?
Questions and answers