A s you wander around the Internet, you will
no doubt run into framed pages that do odd and annoying things. Some
web authors don't want to risk your leaving their site. They make links to outside sites come up inside their own frameset. This is not only rude, it can easily result in a big mess, with frames inside of frames inside of frames...
Where you are:
Lessons > Web
Before you start...
Project 1: Browser Basics Connecting
Project 2: HTML Basics
Step-by-Step: Frame Problems
What you will learn:
|why frames appear inside frames
to open a linked page in new window
to use a site map
Problem: Frame in a Frame
Having frames inside frames is nearly guaranteed to produce a bad result. Here is an example to illustrate the problem.
- If necessary, open My Home Page
and go to the
World Travel Inc. site.
In the navigation frame on the left, click the link The weather, which is
in a list of other web sites. In the right frame a new site is
displayed, which is also framed. Feeling cramped yet?
In the list of
country names, click on Argentina. A new page appears to the far
right, which lists weather information for cities in Argentina.
We're not getting out of the
frames mess yet.
Click on Buenos Aires. A new page loads in
the far right frame for the weather report for Buenos Aires.
We're STILL inside the World Travel Inc. frameset.
This weather report is not part of the
World Travel site. The weather site is still working, even though it is stuck inside the World Travel frameset. But it is not attractive and feels awkward.
We are truly stuck in this frameset! Fortunately there is something you can
do, without having to rewrite the pages yourself to make them behave in a
civilized manner. You can force a page to open in a new window.
Solution by User: Open in new window
In the left frame, right click on the link The weather.
- From the popup menu select .
The link opens in a brand new window, avoiding the frames-within-frames mess.
link is in the main document
frame instead of in a navigation frame, the new page will replace the
page with the link. You will have to use the Back button to return to the page that had the original link so you can right-click on it. Very useful, that Back button!
- Close the new window with the weather pages with the
in the Title Bar.
Solution by Author: Automatic new window
A web author can force a link to
open in a new window, and even control such things as the window size and
what bars are displayed. This is used often for small ad windows and help
documents or if the link is to a different site. Some web authors
really don't want you to just abandon their site!
In the left frame of World Travel, scroll down and click on
the link Site Map.
A small window opens showing a hierarchy tree of the pages in this site. This sort of window can be kept open while you change pages in the original window. For sites without frames such a site map can be especially helpful.
Small windows are also used to display ads and to hold a console for playing music. With a separate window you can listen to the music after you leave the page that started it. You can turn off the music whenever you want. Why doesn't everyone handle music this way??
Watch how many different Internet Explorer windows you have open at once. If you have too many open windows, your computer will slow down and can even freeze. What is the magic number of windows? It depends on the amount of memory your computer has and what other programs you have running at the same time.
- Close the
small window containing the Site Map.