JavaScript Frames Example

In this frames example, you will see how to set up a Web page that is roughly equivalent to the windows example shown earlier in this chapter. A Web page will be created with three frames; the top one will have buttons that use attached JavaScripts to change the contents of the other two. Listing 20.15 shows the main document, which defines the frameset to be used.

Code Listing 20.15. FramEx.htm—The Main Document of a Framed Web Page Is Usually Just the Frameset
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>JavaScript Frames Example</title> </head> <frameset rows="25%,*"> <frame src="Buttons.htm" ...

Get Platinum Edition Using XHTML™, XML, and Java™ 2 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.