5. Frames, Frames, and More Frames

Frames are a useful feature of HTML, though they have fallen somewhat out of favor over the past few years. In this chapter, we’ll demonstrate how to harness the power of JavaScript to make frames even more useful.

A frame consists of at least three pages of HTML. The first, called the frameset, sets up the dimensions of each of the child frames. The frameset is referred to in JavaScript as top or parent. The remainder of the pages fit into the panes that the frameset has created and are the child pages. These can be named anything you choose. Figure 5.1 shows a frameset that creates two child frames, “left” and “content”.

Figure 5.1. Layout of a frameset that contains two frames, “left” and “content”.

Get JavaScript and Ajax for the Web: Visual QuickStart Guide, Seventh Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.