How to Use the Open Browser Window Behavior in Dreamweaver

You can use behaviors in Dreamweaver to create many interactive features, such as opening a new browser window when someone clicks an image or a text link. Opening a new window is a great way to make supplemental information available without losing the original page a visitor was viewing. The Open Browser Window behavior enables you to specify the size of the new window and to display it.

To add the Open Browser Window behavior to a selected image or text on a page, follow these steps:

1

Create the page that will open in the new browser window.

The goal is that when a user clicks the trigger image, a smaller browser window will open to reveal the content for that section. When you name files that will be used in behaviors, avoid using slashes anywhere in a filename or numbers at the beginning of a filename. It’s also best to avoid hyphens and underscores.

2

Select the image, text, or another element you want to serve as the trigger for the action.

You can select any image, text, or other element on a page and apply a behavior to it the same way.

3

Choose Window→Behaviors to open the Behaviors panel. Click the plus sign (+) and choose the behavior you want from the drop-down list.

If a behavior appears dimmed, it can't be associated with the selected element. For example, the Swap Image behavior can be applied only to an image, so it appears dimmed if you’ve selected text or another element.

4

In the Open Browser Window dialog box, specify the settings.

You can set a number of options that control how the new browser window appears:

Use the Browse button to the right of the URL to Display box to select the page you want to open in the new browser window.

Set the window width and height to specify the exact pixel size of the new browser window that will open.

Select the options Navigation Toolbar, Location Toolbar, Status Bar, Menu Bar, Scrollbars as Needed, or Resize Handles if you want the new browser window to include any of these features.

Name the new window, an important step if you want to target that same window to load other pages into it.

5

After you specify all the settings for the behavior, click OK.

The new behavior appears in the Behaviors panel.

6

To change the event that triggers your behavior, select the current event from the left side of the Behaviors panel and then choose the event you want to replace it with from the drop-down list.

You can select any available event to serve as the trigger for the behavior. However, not all events are available for all behaviors.

7

To test the action, save the file and then choose File→Preview in Browser.

Click the image to test whether a new browser window opens.

  • Add a Comment
  • Print
  • Share
blog comments powered by Disqus
Advertisement

Inside Dummies.com