Target Parent Window
In this example, an anchor tag, <A>, with only the
HREF
attribute, points to the reference page, target2.html.
When the viewer, therefore, clicks on the linked text:
"Open,"
the content of target2.html replaces the content of parent1.html
in the current browser window.
- The code:
-
<A HREF="target2.html">Open</A>
a new page in this window.
- produces the following effect:
-
Open
a new page in this window.
To fully demonstrate this and the following examples:
- Size your browser window to cover the the top half of your screen.
- Close or minimize all other open windows on your desktop.
- Click on the above link to "target2.html":
"Open"
- Don't forget to come back to this page for the next example.
In this second example, the anchor tag, <A>,
includes a TARGET tag with the HREF.
When the viewer clicks on the linked text:
"Open",
the content of target2.html is NOW displayed in a separate
window from parent1.html. The user can, therefore, read both
pages on his/her desktop concurrently.
- The code:
-
<A HREF="target2.html"
TARGET="2nd_wind">Open</A>
a new window called 2nd_wind.
- produces the following effect:
-
Open
a new window called 2nd_wind.
In contrast to the first example:
- Click on the above link to "target2.html":
"Open."
- Resize the new browser window displaying, target2.html below parent1.html.
- Fit First Child Window (target2.html) to the lower left corner of your screen.
- It is NOT now necessary to click on its
"back" link to see the
Parent window.
We will now create a link from parent1.html to target3.html, a third file
with TARGET="3rd_wind" exactly like we created a link
to target2.html.
- The code:
-
<A HREF="target3.html"
TARGET="3rd_wind">Open</A>
a new window called 3rd_wind.
- produces the following effect:
-
Open
a new window called 3rd_wind.
To continue with our illustration:
- Click on the above link to target3.html:
"Open."
- Resize the new browser window displaying, target3.html
below parent1.html
.
- Now fit Target Second Window to the lower right corner of your
screen next to target2.html.
- We can now view 3 separate pages, though related, pages on our
screen concurrently.
Our last link from parent1.html will be to target4.html,
with TARGET="2nd_wind" exactly the same TARGET
name we gave to target2.html.
- The code:
-
<A HREF="target4.html"
TARGET="2nd_wind">Replace</A>
the content in the <B>First Child Window</B>!
- produces the following effect:
-
Replace
the content in the First Child Window!
Finally to complete this lesson:
- Click on the above link to target4.html:
"Replace."
- This will cause the text and background color of target4.html
to replace target2.html's content.
- Continue with this lesson, or
- return
to the Table of Contents.
Last Updated: Dec. 13, 1998