Frame Targets

Class notes (b) for April 1, 1996
Professor John M. McCann

Links From a Document in One Frame to Another Frame

Lesson 2 in the frames tutorial we are using discusses targeting frames. When a document in one frame contains links that bring up a document in another frame, you name the second frame and include that name in the "a href=" tag in the first frame.

For instance, in my framed resume, the actual resume appears in the lower-right frame and I named this frame "main" in the frame tag.

I can then refer to this frame from links in the other frames. In particular, the lower-left frame contains a set of links of the form:

"A HREF=res-body.htm#Education target=main"

When this link is selected, action takes place in the "main" frame, which is the lower-right frame.

External Links From a Document Within a Frame

If you select World Wide Web Publications in the lower-left frame of my resume, you move down to that section of my resume in the lower-right frame. Then select one of the links to a document, and it appears in the same frame. If in that document, you select another link, it too appears in the same frame. All the linked documents will appear in that lower-right frame.

What happens when you want to go back to a previous document? It would be natural to click on Netscape's Back button. But this takes you out of my resume and to the document that you had loaded prior to bringing up my resume. The only way to navigate with my framed resume is by using the links in the lower-left frame, or to use the right mouse button: click the right mouse button while in the lower-right frame to get a menu that allows you to go forward and backward within the frame.

I have put together a small frame example that we will discuss in class. It illustrates the use of target names that are discussed in Lesson 2 and in Lesson 3 of Carlton Rose's frame tutorial.