Frames - Targets and Noframes

Section 1 - Introduction
Section 2 - Basics
Section 3 - Next Level
Section 4 - Advanced
      Fancy Lists
      Forms
      Advanced Tables
      Frames
         About frames
         Frameset
         Frame source & name
         Nesting Frames
         Target & Noframes
         Frameset borders, etc.
         Scrolling & Resizing
         Margin width, borders
         IFrame
         Should you? Try it
      Style Sheets
      Image Maps
Section 5 - Publishing
Section 6 - Extras
Appendices
Once, long ago, you learned how to make links pop up in targeted windows. That lesson is going to prove handy now. You remember how each frame received a different name? Than enables you to click on a link in one window and have the information in another window change.

There isn't much you need to do to get links to do this trick. Here's an example of a link that should look familiar, but a target has been added:
<a href="fuzzy.html" target="main">
You may notice that the target is the name of one of our frames. By telling the computer a target, you can click on a link and have the new page open in any frame you wish. Here is the page you saw before, only this time, you can click on a link and have a link open in another window.
Please see the frame

This is very useful for making a table of contents or simply having links do great things. Easy enough?

There is one more thing you can do with targets. You can use targets to get out of the frames completely. Instead of listing the target as the name of a frame, list the target as _top. It looks like this:
<a href="fuzzy.html" target="_top">
This will break you out of the frames and put the link into a fresh page.

One more thing in this lesson. Some people's computers can't view frames. If the person can't view frames, you should provide an alternative route to find your information. You should incluse the "noframes" information.

Noframes is a tag you use to redirect your user to a frameless page. Here's where it goes:
<html>
<head></head>
<frameset cols="20%,*">
      <frame src="cool.html" name="contents">
      <frame src="fuzzy.html" name="main">
</frameset>
<noframes>
The information inside these tags can only be seen on computers that don't show frames. Here is where you can put a link that will direct people to your frameless page.
</noframes>
</html>
It is recommended that you use the <noframes> tag whenever you use frames.
Back Home Forward