Introduction
Text
Formatting
Links
Lists
Images
Tables
Frames
Introduction to Frames
Frameset
Frame Tag
Linking with Frames
Example
Forms
Conclusion


Linking with Frames
Let's take a look at this example, to help give us a better understanding of how the links will work.

Example
The HTML would look like this:

<FRAMESET ROWS="25%,75%">
<FRAME SRC="a.html" NAME="menubar">
<FRAMESET COLS="300,*">
<FRAME SRC="b.html" NAME="news">
<FRAME SRC="c.html" NAME="main">
</FRAMESET>
</FRAMEST>


So we now have 3 frames named menubar, news, and main. Now that the frames have been named we can create links in one frame that will load in another or same frame.

We have to return to the anchor tag the <A> tag, and introduce a new attribute for this tag. It is the TARGET attribute. Here is where you will place the name of the frame you would like the page to load in. If you do not specify a target name in the <A> tag, the page will load into the same frame. Also, there are four reserved names for this value, they are:

  1. _blank: this loads the page in a new browser window and you can use it even when you aren't using frames.
  2. _self: this loads the page into the same window frame.
  3. _parent: this loads the page into the frame that is the parent of the current frame (or the frame it is nested inside of).
  4. _top: this will load the page in the entire window overriding the frames that were inside.
Now we will place link in the menubar window, or inside the a.html document.

<A HREF="news_today.html" TARGET="news">Today's News</A>

In the news frame there will now be news_today.html loaded, and not in the menubar frame where the link is located.

back  next

© Copyright 2000-2002 by Pepmint.com. All Rights Reserved

Search Pepmint.com

home :: tutorial :: portfolio :: links :: hammies :: guestbook :: contact