You will make your frames refer to each other. The way to acomplish
this is with the NAME attribute.
<HEAD>
<TITLE>Framed document</TITLE>
<FRAMESET COLS="*,2*">
<BODY>
<FRAME SRC="first_frame.html" name="frame1">
<FRAME SRC="second_frame.html" name="frame2">
</BODY>
</FRAMESET>
Now you can refer your hyperlinks to the specified Frames. Specifying a target
allows you to direct the file to the refered frame:
<A HREF="test.html" target="frame2">Testing the frames</A>
Click here to see how this works
See an example of a Table of Contents to get an idea of how targets might
be used in practice.
Table of Contents with Frames
Code for Table of Contents example.
Frames are set-up in a toc.html
<html>
<HEAD>
<TITLE>Framed document</TITLE></HEAD>
<FRAMESET COLS="*, 2*">
<BODY>
<FRAME SRC="catalog.html" NAME="frame1">
<FRAME SRC="about.html" NAME="frame2">
</BODY>
</FRAMESET>
</html>
The Table of Contents doc. that appears in the left column frame of the example
is set up like this:
<HTML><HEAD>
<TITLE>Table of Contents</TITLE> </HEAD>
<BODY BGCOLOR="#FFFFFF">
<H2>Imaginary Company Homepage</H2>
<P> <H3>Table of Contents </H3>
<FONT SIZE=4>
<LI><A HREF="about.html" TARGET="frame2">About our company</A>
<P> <P>
<LI><A HREF="products.html" TARGET="frame2">Our Products</A>
<P> <P>
<LI><A HREF="contact.html" TARGET="frame2" >How to contact us</A>
<P> </body></html>
Base targets
If all the frames are loading to the same frame you can use: the
BASE TARGET attribute, rather then adding target="frame2" in every anchor.
<BASE TARGET="frame2">
This is equal to specifying Target="frame2" in every anchor. Place the tag above
the A HREF link tags where you would have specified target.
Magic targets
Netscape defines several magic targets. They all begin with _ underscore.
_top Loads a file into a new browser window
For example: <A HREF="departments.html" target="_blank">Company departments</A>
_self Loads a file into the same window
For example: <A HREF="departments.html" target="_self">Company departments</A>
_blank Loads a file into a new unnamed browser, in a full window.
For example: <A HREF="departments.html" target="_blank">Company departments</A>