Linking to Framed Documents

 < Day Day Up > 



The most common mistake made when developing framed sites is improper links targeting. By default, any clicked link (whether text or graphic button) calls a new page, which replaces the page that holds the link. This is standard link behavior but not the ideal behavior for links in a framed site. If you have your navigation in one frame and want the pages to appear in a separate frame, you must target that frame.

About targets

The target attribute of a link specifies the frame or window in which the linked content opens. Dreamweaver generally offers four target options in the Target menu of the Property inspector: _blank, _top, _parent, and _self. The default target for all links is _self. A new window is launched with _blank. Both _parent and _top are often used with frames. When you are working within a frameset document, Dreamweaver adds your frame names to this list.

Setting link targets

Building a link in framed pages is the same as in non-framed HTML pages, but may require target changes. Here are some possible target scenarios:

  • If the link you create should replace the current page that contains the link, you need not specify a target for the link. The default, _self, will be used.

  • If your link needs to load a page in a different frame, use the Target menu to specify the desired frame. Your frame names should be listed in the menu.

  • If you need a page to load and replace all the current frames, choose _top. Using _top overwrites all current frames and pages with the called page.

The _parent option is intended for replacing one frameset with another when the replaced frameset is the source page for an existing frame, as shown in Figure 39-4. If you are an experienced HTML coder, you may have used this target, but Dreamweaver doesn't generally build framesets in a way that accomodates its intended use. The proper setup of this kind of frameset is covered in the nested framesets section of this chapter.

click to expand
Figure 39-4: You may target the frame or use _parent when your configured framed site doesn't use the stan-dard Dreamweaver nested frames approach.



 < Day Day Up > 



Macromedia Studio MX Bible
Macromedia Studio MX Bible
ISBN: 0764525239
EAN: 2147483647
Year: 2003
Pages: 491

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