tutorial home previous panel: Hyperlinks in Frames next panel: Frame Names

Targeting Frames: Hyperlink Targets

How, then, does a programmer specify which area should be updated when a hyperlink is selected? Netscape introduced a new hyperlink property, target, specifically for this purpose. For each hyperlink, it is now possible to specify not just which document should be loaded, but also where that document should be displayed (i.e., the "target"). The format for a hyperlink with a target is

<a href="document_URL" target="target_name"> Hyperlink Text </a>

The variable target_name may be either

  1. an explicit name assigned to a frame in the frameset document, such as the frame name "bottom" appearing in frameset document a.html, or
  2. an implicit name, which is determined by the target-frame's relationship to the frame containing the hyperlink.

Implicit names are reserved words beginning with an underscore (_). Some of these are listed below:

_self
directs the browser to update the frame containing the activated hyperlink. This is usually the default target when no target is specified.
_parent
directs the browser to update the parent frame of the frame containing the hyperlink. This only makes sense if the current frame is a child frame. Otherwise, _parent has the same effect as _self. Later on I will clarify what I mean by "parent frame."
_top
directs the browser to update the entire window, regardless of the current frame layout.

Next: Targeting Frames: Frame Names

[ menu | previous page | next page ]