Behaviors let users make their HTML pages interactive. They offer web designers an easy way to
assign actions to page elements by filling in an HTML form.
You should write behavior actions when you want to share functions with users or when you want
to insert the same JavaScript function repeatedly but change the parameters each time.
Note: You cannot use behaviors to insert VBScript functions directly; however, you can add a
VBScript function indirectly by editing the DOM in the
The term behavior refers to the combination of an event (such as
and an action (such as Check Plugin, Go to URL, Swap Image). The browser determines which
HTML elements accept which events. Files that list events that each browser supports are stored
in the Configuration/Behaviors/Events folder within the Macromedia Dreamweaver MX 2004
application folder.
Actions are the part of a behavior that you can control; when you write a behavior, you're really
writing an Action file. Actions are HTML files. The
contains an HTML form that accepts parameters for the action (for example, parameters that
indicate which layers are to be shown or hidden). The
JavaScript functions that process form input from the
arguments, and event handlers that are inserted into a user's document.
Note: For information about server behaviors that provide web application functionality, see
Behaviors" on page
247.
CHAPTER 14
function.
applyBehavior()
,
onClick
section of an Action file generally
BODY
section of an Action file contains
HEAD
content and control the functions,
BODY
Behaviors
, or
onLoad
onSubmit
"Server
235
)
Need help?
Do you have a question about the DREAMWEAVER MX 2004-EXTENDING DREAMWEAVER and is the answer not in the manual?