Adobe 38040334 - Dreamweaver CS3 User Manual page 185

Extending dreamweaver
Hide thumbs Also See for 38040334 - Dreamweaver CS3:
Table of Contents

Advertisement

executes whenever the user switches focus between Code view and Design view or when the user
onViewChange
changes between Code view, Design view, or Code and Design view.
executes whenever the document is edited in Design view. Changes that you make in Code view do not
onEdit
trigger this event.
executes whenever the selection changes in Design view. Changes that you make in Code view do
onSelChange
not trigger this event.
executes regularly when the application is idle. This can be time-consuming because the
onEveryIdle
enabler/checked/showif/value
have their enable state changed at special times, and handlers should be quick.
Note: In all these cases, Dreamweaver actually executes the handlers after the specified event occurs, when the appli-
cation is in a quiescent state. It is not guaranteed that your handlers run after every edit or selection change; your
handlers run soon after a batch of edits or selection changes occur. The handlers are guaranteed to run when the user
clicks on a toolbar item.
Example
update="onViewChange"
command="script"
This attribute is required for all items except menu buttons. Dreamweaver ignores the
buttons. Specifies the JavaScript function to execute when the user performs one of the following actions:
• Clicks a button
• Selects an item from a pop-up menu or combo box
• Tabs out of, presses Return in, or clicks away from a text box or combo box
• Selects a color from a color picker
The
attribute is equivalent to the
command
Example
command="dw.toggleLiveDebug()"
arguments="argument_list"
Optional. This attribute specifies the comma-separated list of arguments to pass to the
function in a toolbar command file. If you do not specify the
the toolbar item. In addition, pop-up menus, combo boxes, text boxes, and color pickers pass their current value as
the first argument, before any arguments that the
arguments are specified.
Example
On a toolbar that has Undo and Redo buttons, each button calls the menu commands file, Edit_Clipboard.htm, and
passes an argument that specifies the action, as shown in the following example:
handlers are running often. It should be used only for buttons that need to
receiveArguments()
arguments
attribute specifies, and before the item ID if no
arguments
command
function in a toolbar command file.
receiveArguments()
attribute, Dreamweaver passes the ID of
DREAMWEAVER CS3
Extending Dreamweaver
attribute for menu
179

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver cs3

Table of Contents