www.webkitz.com www.webkitz.com

Behaviors and Rollovers

Behaviors in Dreamweaver apply commonly used Javascript to web pages without requiring knowledge of Javascript. These behaviors provide interactivity in your web pages. Some behaviors require users to interact with the documents such as rolling the mouse over a certain section. (i.e. onMouseOver) Other behaviors take place without interaction by the user, such as the document body loading into the window. (i.e. onLoad).

Behaviors are made up of:
a selected item in the document that behavior is applied to such as an image, a link, or the body of the document, a form or a form field by clicking on its tag in the lower corner of the document window.
an event
and an action (behavior)

To add a behavior:
Choose Window > Behaviors to get the behavior palette
In the behavior palette, you can choose events supported by different browsers in the Events for drop-down menu.
3.0 and Later Browsers (most accessible)
4.0 and Later Browsers (next most accessible)
IE 3.0
IE 4.0
IE 5.0
Netscape 3.0
Netscape 4.0

Note: Choosing only one browser for events (IE 5.0) is only appropriate if you know for sure that everyone looking at your page is using the same browser. This could be the case on an intranet site that is only accessed by a company that has standardized their browser. You can not guarantee browser use on Internet so choosing 3.0 and later is best.

3. Click on the item tag of the selected item in the lower left of the document window to apply the behavior to.

For Example:
Object to apply behavior to Tag to click in the lower left of document window
image <img>
link <a>
body <body>
form <form>

4. Click the + on the palette and choose from the available actions that are supported by the browser choice you made. (For example: 3.0 + 4.0 Browsers)

Behaviors

5. Choose the event that the user must perform to get the action to take place by clicking on the drop down arrow to the right of the event. (For Example: onMouseOver)

Dreamweaver 3.0 Behaviors Chart and Samples
Behaviors for 3.0 + 4.0 Browsers Click Items to Select on bottom left status bar

Example Events
Type in dialog
Display Status Message <a>, <body>,< img> onLoad message to be displayed on the bottom of the browser window.
Go to URL <a>, <body>,< img> onMouseOver URL
Popup Message <a>, <body>, <img> onMouseOver message
Open Browser Window <a>, <body>,< img> onMouseOver make a separate html document and set attributes of window
Check Plugin <a>, <body> onLoad

send to URL or alternative URL

For 3rd party plug-in names must be exact as found in Netscape Help > About Plug-in Page
Rollover Images <img>

onMouseOver

onMouseOut
Created through Insert > Rollover Image

Sample Behaviors and Creation Directions

Display Status Message on the bottom of the browser window

GoTo URL

PopUp Message

Open Browser Window