Results 1 to 2 of 2

Thread: How to refresh an image when page refreshed?

  1. #1
    Join Date
    Apr 2010
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default How to refresh an image when page refreshed?

    Hi there,

    I need to refresh an image every time the page is refreshed. I mean at the cornor of the page there is an image displayed. Every time the page refreshed the image will be changed to next one. Any idea how to do it will be appreciated. Thanks in advance.

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    Do you want the image to be in a sequence or random?
    It will be much easier to do this in a random order:
    Use Javascript to randomly pick an image when you load or use a server side language (like PHP) to pick a random image's URL for the <img> tag when generating the page.

    You can make it in a certain order if you'd prefer and this means tracking what was last shown: in Javascript you must use cookies; in PHP (etc) you can use cookies or sessions.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •