In this command, the
the command. More complex menu commands might call different functions to execute the
command. For example, the following code checks whether the first argument is
is, it calls the
doOperationX()
argument is
, it calls the
"bar"
The
doOperationX()
command.
function receiveArguments(){
if (arguments.length != 2) return;
var whatToDo = arguments[0];
if (whatToDo == "foo"){
doOperationX(arguments[1]);
}else if (whatToDo == "bar"){
doOperationX(arguments[1]);
}
}
setMenuText()
Dreamweaver calls the
item. If you do not define the
specified in the
name
The
setMenuText()
. If the value of the argument is
arguments[0]
function; if it is
dw.getUndoText()
function returns text that specifies the operation that Dreamweaver will
dw.getUndoText()
undo. For example, if the user executes multiple Redo operations,
return the menu text "Undo Edit Source." Likewise, the
text that specifies the operation that Dreamweaver will redo. If the user executes multiple
Undo operations, the
Source."
200
Menus and Menu Commands
receiveArguments()
function and passes it the second argument. If the first
doOperationY()
or
doOperationY()
function to determine what text appears for the menu
setMenuText()
setMenuText()
attribute of the
menuitem
function checks the value of the argument that Dreamweaver passes,
"redo"
function could return the menu text "Redo Edit
dw.RedoText()
function processes the arguments and executes
function and passes it the second argument.
function is responsible for executing the
function, Dreamweaver uses the text that you
tag.
, Dreamweaver calls the
"undo"
, Dreamweaver calls
dw.getRedoText()
"foo"
. The
dw.getRedoText()
dw.getUndoText()
function returns
; if it
could
Need help?
Do you have a question about the DREAMWEAVER 8-EXTENDING DREAMWEAVER and is the answer not in the manual?
Questions and answers