Opening a New Browser Window


It isn't a good idea to open a new browser window unless you really, really need one. Some users may not realize that a new window opened. Users may become lost or confused by the grayed-out Back button. Users may not realize they must close the new window to get back to the original page. Certain browsers, particularly those used by people with accessibility needs, may not deal with new windows in a way that helps the user understand what's happening. Depending on the action you use to trigger the opening of the new window, some users may not see it at all. For example, setting a new window to open during an onLoad event is the trick to getting a pop-up ad in a user's face. Therefore, many users set their browsers so pop-up windows won't open, ever.

Given all that, when is a new browser window justified? Consider it if the content of the new window is a small example or elaboration on one idea. Small means smaller than a normal- sized browser window. Small also means small in concept: if the main content of your page is clear already, a new window can add a little something people can check if they're interested. For instance, a good use of a new window is to show an enlarged image of a product.

You should explicitly tell the user that their click will cause a new window to open: "Click the image to see a larger view! Opens in new window." Leave the decision about whether to click up to your usersdon't blindside them with windows that automatically open without warning.

To add the Open Browser Window action:

1.
Prepare an HTML page or an image to appear in the new window.

2.
Select an object such as a link or image in the document window.

3.
In the Behaviors panel, click the plus sign to add a new behavior. Choose Open Browser Window from the pop-up menu, and the Open Browser Window dialog appears ( Figure 12.18 ).

Figure 12.18. When you open a new browser window, you have all kinds of control over how that new window will appear.


4.
Fill out the following fields:

  • URL to display: This is the HTML page or image that will appear in the new window.

  • Window width and Window height: Set an exact pixel size for the new window.

  • Navigation toolbar: Checking this box adds Back, Forward, Home, and Reload buttons .

  • Location toolbar: Checking this box adds a location text box with the page URL showing.

  • Status bar: Checking this box adds a display at the bottom of the browser window showing status information.

  • Menu bar: Checking this box adds browser menu items, such as File, Edit, View, Go, and Help. This option only applies to Windows users; Mac users always have access to the menu.

  • Scrollbars as needed: Checking this box adds scrollbars (either horizontal or vertical) only if needed. If unchecked, there will be no scrollbars. It's a good idea to always check this.

  • Resize handles: Checking this box adds a gripper in the lower-right corner of the window for the user to drag, and a maximize button at the top of the window. If unchecked, the user can't resize the window by either method. This is another good attribute to routinely include.

  • Window name : This is a required identifier needed by JavaScript. Remember, no spaces are allowed in this name.

5.
Click OK to accept.

6.
Check the default event. If it isn't the event you want, select another event from the pop-up menu.

Tips

  • If the new window contains only an image, the pixel dimensions of the image and the pixel dimensions of the window aren't an exact match. For better control, many designers put the single image on an HTML page and link to the HTML page.

  • Dreamweaver can be extended with an action to add a "Close Window" script to an HTML page. It's a good idea to give users an obvious way to close the new window. See "Finding and Installing Extensions" in Appendix B for more information about extending Dreamweaver.

  • The event choices are determined by the targeted browsers. If an event you want is not available, check to see what's selected in the Show Events For submenu of the Add Events menu.





Macromedia Dreamweaver 8 for Windows & Macintosh Visual QuickStart Guide
Macromedia Dreamweaver 8 for Windows & Macintosh
ISBN: 0321350278
EAN: 2147483647
Year: 2005
Pages: 239

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net