Share this Page URL

Chapter 27. Dividing a Page into Frames > Specifying the Frame in Which a Linke... - Pg. 435

Dividing a Page into Frames <FRAMESET COLS="30%,*"> <FRAME SRC="MULTI.HTM"> <FRAME SRC="DESCRIP.HTM"> </FRAMESET> </HTML> 435 7. 8. Choose File, Save, and save the new frame definition page. Be sure to save it in the same folder as its content files (the ones created in step 1). Test your new page by opening the frame definition page in your browser (see Figure 27.7). Figure 27.7. Step 8: Test the page in a browser. Specifying the Frame in Which a Linked Page Opens If you code your frame definition pages as shown up to this point in the chapter, a link that appears in any of the pages opens its corresponding file in the same frame that holds the link. In other words, if I click a link that's shown in the upper-left frame, the page opened by that link also appears in the upper-left frame, replacing the file that was there. If you want a link in one frame to open a new page in another frame, you must do two things: · In the <FRAME SRC> lines of the frameset, give each frame a name. · In the links within the content files, indicate the name of the frame in which the linked file should open. Naming the Frames Using the page created in the preceding example as a starting point, name the frames. Add the NAME= attribute to the <FRAME SRC> tag after the filename (and a blank space), as shown in the following code: