pauli
08-31-2003, 03:23 PM
Hi,
I have the following JS code:
function displayNextImage(place,menu) {
var new_image = getNextImage();
document[place].src = new_image;
menu.selectedIndex = ImageIndex;
timerID = setTimeout(function() {displayNextImage(place,menu)}, interval);
}
On a slow connection the image sometimes hasn't fully displayed before the timeOut function is called to get the next image.
How can I delay the setTimeout being called until the image current image has been fully displayed ???
I have the following JS code:
function displayNextImage(place,menu) {
var new_image = getNextImage();
document[place].src = new_image;
menu.selectedIndex = ImageIndex;
timerID = setTimeout(function() {displayNextImage(place,menu)}, interval);
}
On a slow connection the image sometimes hasn't fully displayed before the timeOut function is called to get the next image.
How can I delay the setTimeout being called until the image current image has been fully displayed ???