Chapter 14: Behaviors - MACROMEDIA DREAMWEAVER 8-EXTENDING DREAMWEAVER Manual

Extending dreamweaver
Table of Contents

Advertisement

CHAPTER 14
Behaviors
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.
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
onSubmit
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 8 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
generally contains an HTML form that accepts parameters for the action (for example,
parameters that indicate which layers to display or hide). The
contains JavaScript functions that process form input from the
functions, arguments, and event handlers that are inserted into a user's document.
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.
You cannot use behaviors to insert VBScript functions directly; however, you can add a
VBScript function indirectly by editing the Document Object Model (DOM) in the
applyBehavior() function.
The following table lists the files you use to create behavior actions:
Path
Configuration/Behaviors/Actions/
For information about server behaviors that provide web application functionality, see
Chapter 15, "Server Behaviors," on page
BODY
HEAD
File
Description
The BODY of the file contains an
behavior action.htm
HTML form for the action's
parameters. The HEAD of the file
contains the JavaScript functions.
321.
,
, or
onClick
onLoad
section of an Action file
section of an Action file
content and control the
BODY
1 4
305

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver 8

Table of Contents