|
-
Aug 30th, 2000, 02:55 PM
#1
Thread Starter
Frenzied Member
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) ??
-
Aug 30th, 2000, 03:26 PM
#2
Monday Morning Lunatic
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.
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>
[Edited by parksie on 08-31-2000 at 08:59 AM]
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Aug 31st, 2000, 04:33 AM
#3
Thread Starter
Frenzied Member
-
Aug 31st, 2000, 04:46 AM
#4
Thread Starter
Frenzied Member
I tried that and got an error:
Line 7 Expected ';'
Line 12 Object does not support this property or method
???????????
-
Aug 31st, 2000, 07:59 AM
#5
Monday Morning Lunatic
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.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Aug 31st, 2000, 02:45 PM
#6
Thread Starter
Frenzied Member
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|