Timing

Unit 13

Timing

setTimeout() only runs one time. setInterval() keeps repeating.

Slideshow

sample-2-slideshow displays cycle of preloaded images.

Lab 4

In lab 4 you will build one more page.

Put your web page on the Internet

Put your page on the Internet.

Test your page

Validate your page before trying to get the JavaScript to work. Then make sure the JavaScript works.

Complete lab 4

You have done all the work for lab 4.
Now, send note to instructor.

Reading assignment

Reading assignments are in the text book, Java Script, A Beginner's Guide, Second Edition, by John Pollock; McGraw Hill / Osborne, ISBN 0-07-222790-7

In module 10, review setInterval(), setTimeout(), clearInterval(), and clearTimeout().
In module 16, section 16.4, read the sections about Preloading and A Simple Rollover. We are loading images with an interval timer, whereas rollovers load images based on mouse movements. The image management techniques are similar for both of these. The eval() function is discussed here.
Don't worry about arrays, we will read about them in the next unit. The rollover example in the book works without an array.

Alternate reading assignments are in the text book, Java Script Concepts & Techniques Programming Interactive Web Sites, by Tina Spain McDuffie; Franklin, Beedle & Associates, ISBN 1-887902-45-7

Read Chapter 8, sections:

  • setTimeout() and setInterval(); be careful of the spelling of setTimeout.
  • Using setInterval to Create an Automatic Slideshow, including Preloading Images

Lecture notes

Do NOT read the lecture notes before hearing the lecture. If you do, you will find the lecture very boring. Read the lecture notes if you do not attend the lecture, or if you wish to review the material.