The Toolbar Command Api - MACROMEDIA DREAMWEAVER 8-EXTENDING DREAMWEAVER Manual

Extending dreamweaver
Table of Contents

Advertisement

Example
command="dw.toggleLiveDebug()"
arguments="argument_list"
Optional. This attribute specifies the comma-separated list of arguments to pass to
the
receiveArguments()
attribute, Dreamweaver passes the ID of the toolbar item. In addition, pop-up
arguments
menus, combo boxes, text boxes, and color pickers pass their current value as the first
argument, before any arguments that the
ID if no arguments are specified.
Example
On a toolbar that has Undo and Redo buttons, each button calls the menu command file,
Edit_Clipboard.htm, and passes an argument that specifies the action, as shown in the
following example:
<button id="DW_Undo"
image="Toolbars/images/MM/undo.gif"
disabledImage="Toolbars/images/MM/undo_dis.gif"
tooltip="Undo"
file="Menus/MM/Edit_Clipboard.htm"
arguments="'undo'"
update="onEveryIdle"/>
<button id="DW_Redo"
image="Toolbars/images/MM/redo.gif"
disabledImage="Toolbars/images/MM/redo_dis.gif"
tooltip="Redo"
file="Menus/MM/Edit_Clipboard.htm"
arguments="'redo'"
update="onEveryIdle"/>

The toolbar command API

In many cases where you specify a script for an attribute, you can also implement the attribute
through a JavaScript function in a command file. This action is necessary when the functions
need to take arguments, as in the command handler for a text box. It is required for pop-up
menus and combo boxes.
The command file API for toolbar items is an extension of the menu command file API, so
you can reuse menu command files directly as toolbar command files, perhaps with some
additional functions that are specific to toolbars.
238
Toolbars
function in a toolbar command file. If you do not specify the
arguments
attribute specifies, and before the item

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the DREAMWEAVER 8-EXTENDING DREAMWEAVER and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Dreamweaver 8

Table of Contents