Loading Different Contents into a Window
In the previous task, clicking a link created a new window, filled with an image. But what if you have several links on a page, and you want them all to target the same new window? Script 6.3 demonstrates this technique. The main window in Figure 6.4 has three links. Clicking any of the links opens a new window, filled with the image of the appropriate book. If you switch back to the main window and click another link, the image in the smaller window is replaced.
Script 6.3. With this script, you can open a new window and fill it with a variety of content, triggered by clicking different links.
Figure 6.4. Clicking any of the three links opens the smaller window and fills it with the cover image of the appropriate book.
To load different contents into a window: