Forum Moderators: open

Message Too Old, No Replies

Background Image Auto Change With Page Refresh?

HTML, CSS, Javascript?

         

pab1953

3:56 pm on Jun 6, 2009 (gmt 0)

10+ Year Member



How do I get the background image to automatically change when the page is refreshed?

Not sure if I should be using HTML, CSS or Javascript.

Thanks.

Jonesy

11:43 pm on Jun 6, 2009 (gmt 0)

10+ Year Member Top Contributors Of The Month



I'd use PHP.
I do use PHP for random image (1 of 20) presentation on a home page.

Jonesy

swa66

1:33 pm on Jun 7, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



html and CSS don't do random, nor keep track of changes.

So that leaves either client side things like javascript or any server side coding.

If you specifically seek a refresh and not just a random image, you'll need a way to track this is a refresh, so a likely choice would be session tracking server side and solving it there.