<frame>

Be Sure You Are on Target

Where do you want to go?

With frames you have choices. If you do not choose, you may have quite a surprise.

When you make a link from a non-frame page, you will recall that the new page usually replaces the old in your browser window. The same thing happens when you link from a framed page. However, in a framed page, each frame functions like a separate browser window.

Consider the link to "schedule" in the top navigation frame on this unit, for an example. Usually the link for that is "<a href="sched.htm">Schedule</a>. However, if I do only that in the framed version, the schedule will try to open up only in that space for the top navigation bar. It looks pretty silly and cannot be read.

The way to avoid this is by adding a target to the link. When you set up the frameset, you defined not only the source but also a name for each frame. You can use that name to define your target.

For example, in the framed version of this unit there is a "contents" frame on the left with links to each of these comment pages. The name of the frame where the text appears is defined in the frameset as "texthere". So the link to this page reads <a href="text9d.htm" target="texthere">On Target</a> Without that target="texthere" the comments would open in the smaller frame on the left where the topics are listed.

If you want to open the link in an entirely new browser window to fill the entire screen, you can use target="_blank".

To make sure the link opens in the same frame from which you are linking, you can use target="_self".

Return to Unit 9

 

Two Frames at Once

If you want to get fancy, see the instructions at Webmonkey for changing two frames at one time.

 

Other comment notes for this unit:
cons and pros | alternatives | frameset

Readings
Resources
<head>
<p> etc.
<b> etc.
<li> etc.
<a href>
<img src>
Access
<table>
<frame>
<style>
<form>
<script>
<object>
validate

Copyright by dwang, 1999. All rights reserved.

Valid HTML! 1