Guide to frames usage
Frames syntax: the TARGET attribute
Normally, a link in a document displayed in a frame updates that same
frame. Updating another frame is done with the use of the TARGET
attribute. This attribute (which can be used with the A, FORM, AREA and BASE elements) specifies
the name of a frame. Only frames which are named with the NAME attribute
on the FRAME tag that was used to define them
can be targeted this way.
Note that if the name given does not correspond to any existing frame,
a new window will be created and assigned that name. Other
links that specify that name will then update that new window.
TARGET on A (hyperlinks)
The A element is used
for normal hyperlinks. If the TARGET attribute is used, the linked
document will be displayed in the named frame.
TARGET on FORM (forms)
To specify that the results of submitting a form should be displayed
in another frame, the TARGET attribute is used on the FORM element that defines
TARGET on AREA (client-side imagemaps)
A client-side imagemap defines several areas on an image, each of which
correspond to a different document which is displayed when the image
is "clicked" in that area. This area is specified using the
AREA element. If the
TARGET attribute is used here, clicking that region will load the
specified document in the indicated frame.
TARGET on BASE (base location of document)
If a large number of links in a document in a frame is all specified
to update the same (other) frame, the BASE element can be used
to specify a default value. All links that do not have a TARGET
attribute will now update the frame specified in the BASE element,
instead of the frame that the document is in.
Special values for TARGET
There are four special values for the TARGET attribute. Each such value
begins with the
"_" character, which is illegal in normal
frame names. The values are:
- This targets the entire browser window. Following this link will
remove all existing framesets.
- Following a link which specifies TARGET="_blank" will create a new
browser window, which has no name.
- Similar to "_top", but it only removes the frameset that directly
contains this frame. If framesets are nested, using "_parent" allows
you to get rid of only part of the framesets, instead of all.
- This value indicates the frame that the document is in. It is
the default value for links that do not have a TARGET attribute. When
the document specifies another default, using the BASE target as
described above, this value can be used to override that default.
Last modified: 31 Mar 1997.
Copyright © 1996 - 2006.
Engelfriet. All rights reserved.