Creating Pop-up Messages

Use the Popup Message behavior to create an alert box that displays a message to the user. Applying the Popup Message behavior in the Behaviors panel opens the Popup Message dialog box, shown in Figure 15-4.

The Popup Message dialog box

Figure 15-4. The Popup Message dialog box

In the Popup Message dialog box’s Message field, enter the text for the alert box. The resulting alert box, shown in Figure 15-5, includes an OK button. Alert boxes prevent users from continuing until they click the OK button, so use the Popup Message behavior sparingly.

An alert box as displayed to the user

Figure 15-5. An alert box as displayed to the user

You can incorporate JavaScript in the message text, but the dialog box’s appearance is not customizable. To simulate a multibutton dialog box, display an HTML form designed to look like a dialog box by using the Open Browser Window behavior.

The next chapter covers miscellaneous behaviors that don’t fit within the previously discussed categories .

Get Dreamweaver in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.