You are here: irt.org | About | Feedback | 1494 [ previous next ]
Feedback on:
Displaying Temporary Pages
Sent by
Peter Wilson on July 15, 2000 at 11:09:23:
Worth:
Very worth reading
Comments:
Why have a variable for each image, if you know that you have N images to load why not maintain a count of images already loaded? This should simplify and generalize the code.
var numberOfImages = 5;
var numberOfImagesLoaded = 0;
function checkImage() {
numberOfImageLoaded++;
if (numberOfImagesLoaded >= numberOfImages) {
...
}
}
Other feedback on 'Displaying Temporary Pages' - show all