Adobe 38040334 - Dreamweaver CS3 User Manual page 236

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

Advertisement

Chapter 16: 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 deter-
onSubmit
mines which HTML elements accept which events. Files that list events that each browser
supports are stored in the Configuration/Behaviors/Events folder within the Adobe
Dreamweaver CS3 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 body section of an Action file generally
contains an HTML form that accepts parameters for the action (for example, parameters that
indicate which absolutely positioned elements to display or hide). The head section of an Action
file contains JavaScript functions that process form input from the body content and control 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.
Note: 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
function.
applyBehavior()
The following table lists the files you use to create behavior actions:
Path
Configuration/Behaviors/Actions/
Note: For information about server behaviors that provide web application functionality, see
"Server behaviors" on page 243.
File
Description
behavior action.htm
The body of the file contains an HTML form for the
action's parameters. The head of the file contains
the JavaScript functions.
,
, or
onClick
onLoad

Advertisement

Table of Contents
loading

This manual is also suitable for:

Dreamweaver cs3

Table of Contents