Possible Duplicates:
Refresh Image PHP and Javascript
How to reload img every 5 second using javascript ?
i need an image on my website to refresh every 10 mins, but i dont want it to refresh the whole website
im not even sure if this is possible but if it is can you please help me
many thanks
connor
Every time you want to reload the image, you must change the image url like so: “screen.jpg?rand=123456789” where “123456789” is a randomly generated number, which is regenerated every time you want to reload the image. The browser will think that it is a different image, and actually download it again, instead of retrieve it from the cache. The web server will most likely ignore and discard everything after the question mark.
To cause the reload in the first place, your would have to use Javascript to get the image element and change the source. The easiest option I can see is to give the image element an
idattribute, like so:Then you may change the source of the image:
To do this on a set timer, then use the top-level Javascript function
setInterval:The second argument specifies 5000 milliseconds, which equates to 5 seconds.
This is a quote from: How to reload img every 5 second using javascript?
This method pretty much describes exactly what you seem to want. All you need to do is change the time.