WWW

name your targets

Once you've set up your frames, you need to figure out how to use them. One of the best ways to use frames is to make a link in one frame open a page in another frame. You accomplish this by using the NAME attribute of the <FRAME> tag and the TARGET attribute of the <A> tag.

The NAME attribute gives each frame an identity as whatever name you choose. Thus, if you have two frames--one for the navigational toolbar and the other for general content--you might name them like this:

<FRAMESET COLS="20%,80%">
<FRAME NAME="Toolbar" SRC="toolbar.html">
<FRAME NAME="Content" SRC="index.html">
</FRAMESET>

Within the toolbar.html document, the toolbar's links would look something like this:

<A HREF="index.html" TARGET="Content">Home</A>
<A HREF="products.html" TARGET="Content">Products</A>
<A HREF="info.html" TARGET="Content">About Us</A>
<A HREF="feedback.html" TARGET="Content">Feedback</A>
show me!

This way, no matter which link the viewer clicks, the document called up by the link will open in the second frame, the "Content" frame.

If you want a link to jump out of the frame setup entirely (for instance, if you're linking to someone else's site and don't want to force it into your frames), just give the TARGET attribute a value of _top--like so:

<A HREF="http://www.othersite.com/" TARGET="_top">Check out this other site for more cool info.</A>
 
 
 
 
show me!

Make sure not to forget the underscore before top. Otherwise, the link will look for a frame with a NAME attribute of top, which is not at all what you want it to do.



Vogel Publishing s.r.o.