JavaScript Windows Example

This example shows one application of how to create and use other Web browser windows. In this example, JavaScripts are attached to the onClick events of XHTML forms buttons and are used to open and/or fill two other windows. The object of the windows, in this application, is to display pictures and accompanying biographical information.

This example shows how it is possible to create XHTML forms-based buttons that call JavaScripts and use them to create, to assign content to, and to destroy other windows. In addition, this example shows you how a script in a created window can manipulate the content back in the window that created it.

Listing 20.10 shows WindEx.htm, the top-level XHTML document for this example. The ...

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.