I need to make a web page that has a piece of vb script in it that every 5 mins changes a picture on that site to the next one in a collection of images. How can i do this ??
can i use document.picture1.picture = loadpicture(moon.bmp) ??
Printable View
I need to make a web page that has a piece of vb script in it that every 5 mins changes a picture on that site to the next one in a collection of images. How can i do this ??
can i use document.picture1.picture = loadpicture(moon.bmp) ??
You can't use a bmp image in a web page. JavaScript has a function called setTimeOut, where you can set it to execute a command. Here's some code that may not work, but it's sort of what you want.
[Edited by parksie on 08-31-2000 at 08:59 AM]Code:<html>
<script language="JavaScript">
var imgs;
imgs[0] = "1.gif";
imgs[1] = "2.gif";
imgs[2] = "3.gif";
function NextImage() {
static var curimg;
curimg++;
document.images["myimage"].src = imgs[curimg];
}
</script>
</head>
<body onLoad="window.setTimeOut('NextImage();', 300000)">
<img src="1.gif" name="myimage">
</body>
</html>
Thanks, i will try that
I tried that and got an error:
Line 7 Expected ';'
Line 12 Object does not support this property or method
???????????
Oh damn...forgot the semicolons. (i edited the post).
Anyway - I said it probably wouldn't work, since I can't use JS at the moment.
Na, i got the same error, can you let me know when you have got it going. I can use DHTML page to do this but i dont know how to do the cookies using the functions it gives you, i get an error while trying to get the cookie.