This is working fine for one image, but how can I apply this script to multiple images on the same page?? I need to auto refresh 10 images.. Any help will be highly appreciated.
<SCRIPT language="JavaScript" type="text/javascript">
var t = 20 // Interval in Seconds
images = new Array('1.jpg','2.jpg','3.jpg'); //URLs of the Images
function Start() {
tmp = new Date();
tmp = "?"+tmp.getTime();
for (i=1;i<image.length;i++){
document.getElementById("img"+i).src = images[i]+tmp;
}
setTimeout("Start()", t*1000)
}
Start();
</SCRIPT>
<SCRIPT language="JavaScript" type="text/javascript">
var t = 35 // Interval in Seconds
images = new Array('../imgcam/mostasquare_1.jpg','../imgcam/mriehelbypass_1.jpg'); //URLs of the Images
function Start() {
tmp = new Date();
tmp = "?"+tmp.getTime();
for (i=1;i<image.length;i++){
document.getElementById("img"+i).src = images[i]+tmp;
}
setTimeout("Start()", t*1000)
}
Start();
</SCRIPT>
what are those iframes for ? as far as your question i understood your question that you want to refresh images. you just need only img elements not iframes.
Bookmarks