• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL

Chapter 10. Using Dreamweaver Behaviors > Using the Behaviors Panel

Using the Behaviors Panel

The Behaviors panel, available by selecting the Behaviors option from the Window menu, is the catalyst for attaching behaviors to objects on your page. Although we'll certainly cover the myriad of available behaviors throughout the chapter, for now let's walk through the process of attaching a simple behavior, similar to the one we wrote by hand, using the Behaviors panel. To do this, follow these steps:

Create a new HTML page by choosing the New option from the File menu. When the New Document dialog appears, select the HTML option from the Basic Page category and click Create.

With your cursor in the new blank page, insert a new Button form object by cliciking the Button icon from the Forms category of the Insert bar.

When the Add Form Tag dialog appears, click No.

With the Button form object selected, change the Action to None so the button doesn't try to submit or reset the non-existent form when it's clicked. You can also change the button's Value to read anything you'd like. I'll change mine to say Click Me.

If you haven't done so already, open the Behaviors panel by choosing the Behaviors option from the Window menu (or by pressing Shift+F4). With the panel open, click the Add (+) icon to expand the Behaviors list and choose the Popup Message Behavior similar to Figure 10.2.

Figure 10.2. Select the Popup Message Behavior from the Behaviors panel list.

When the Popup Message dialog appears, enter some text. I'll enter the text Hello. Click OK.

Save your work and test the results in the browser by choosing the Preview in Browser option from the Document bar (or by pressing F12). Click the button in the browser to see the popup message appear.



Not a subscriber?

Start A Free Trial

  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint