HTML and CSS Reference
In-Depth Information
The whichimage variable is set to the index value of the current image. After the
user clicks the link in the current image, the switch statement is used to match on
the index value of that image and then redirect the user to a page describing the
planet. By using the back button, the slideshow will continue.
The location property of the window object is assigned a Web page describing the
planet that the user clicked during the slideshow.
Once the page has loaded, the functions preLoadImages() sand StartShow() are
called to preload the images and then start the slide show. In this example, there
are no controls to start or stop the slideshow.
The first image, Jupiter.bmp, is assigned to a link, that when clicked, will call the
function, slideLink() to bring up another page with a description of Jupiter. Out-
put is shown in Figures 12.23 and 12.24. Figure 12.25 shows an open source Web
site that includes example slideshows.
Figure 12.23 A clickable image slideshow.
Figure 12.24 After the user clicks on the planet Neptune, he or she is redirected to the URL
shown here.
Search WWH ::

Custom Search