Results 1 to 6 of 6

Thread: Help

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2000
    Location
    England, Buckingham
    Posts
    1,341
    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) ??

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    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

  3. #3

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2000
    Location
    England, Buckingham
    Posts
    1,341
    Thanks, i will try that

  4. #4

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2000
    Location
    England, Buckingham
    Posts
    1,341
    I tried that and got an error:

    Line 7 Expected ';'

    Line 12 Object does not support this property or method

    ???????????

  5. #5
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    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

  6. #6

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2000
    Location
    England, Buckingham
    Posts
    1,341
    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
  •  



Click Here to Expand Forum to Full Width