15.02.2013 Views

JavaScript Examples Bible - UserWorks Technologies

JavaScript Examples Bible - UserWorks Technologies

JavaScript Examples Bible - UserWorks Technologies

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

cols<br />

rows<br />

Chapter 2 ✦ Window and Frame Objects (Chapter 16)<br />

NN2 NN3 NN4 NN6 IE3/J1 IE3/J2 IE4 IE5 IE5.5<br />

Compatibility ✓ ✓ ✓ ✓<br />

Example<br />

Listings 16-46 through 16-48 show the HTML for a frameset and two of the three<br />

documents that go into the frameset. The final document is an HTML version of the<br />

U.S. Bill of Rights, which is serving here as a content frame for the demonstration.<br />

The frameset listing (16-46) shows a three-frame setup. Down the left column is a<br />

table of contents (16-47). The right column is divided into two rows. In the top row<br />

is a simple control (16-48) that hides and shows the table of contents frame. As the<br />

user clicks the hot text of the control (located inside a SPAN element), the onClick<br />

event handler invokes the toggleTOC() function in the frameset. Figure 2-10 shows<br />

the frameset with the menu exposed.<br />

Figure 2-10: Frameset specifications are modified on the fly when you click on the top<br />

control link.<br />

195<br />

FRAMESET.cols

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!