P
Prisoner at War
Hi, Everybody,
The fucntion below is called by an onLoad <img> attribute, and it is
supposed to replace the original image, after three seconds, with
another image. This second image shouldl be replaced, after eight
more seconds, with the original image.
For some reason, JavaScript keeps swapping the images back and forth
endlessly -- and not even properly counting out all the seconds
specified, after the first time swapping! What's going on???
function mytest() {
setTimeout("window.document.test.src='../images/substitute.jpg';",
3000);
setTimeout("window.document.test.src='../images/original.jpg';",
8000);
}
The fucntion below is called by an onLoad <img> attribute, and it is
supposed to replace the original image, after three seconds, with
another image. This second image shouldl be replaced, after eight
more seconds, with the original image.
For some reason, JavaScript keeps swapping the images back and forth
endlessly -- and not even properly counting out all the seconds
specified, after the first time swapping! What's going on???
function mytest() {
setTimeout("window.document.test.src='../images/substitute.jpg';",
3000);
setTimeout("window.document.test.src='../images/original.jpg';",
8000);
}