HTML and CSS Reference
In-Depth Information
EXPLANATION
11
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.
12
The location property of the window object is assigned a Web page describing the
planet that the user clicked during the slideshow.
13
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.
14
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