PDA

View Full Version : New Image For Each Reload WITHOUT javascript


Sacharissa
20th June 12, 09:57 AM
I don't have any coding to show you because I'm not even sure if this can be done. I want my splash page to show a different image from a pre-created set each time the page is loaded or reloaded. I've found several ways of doing this using javascript but frankly I'm not very good with js. And to be honest I'm not fond of working with it. Besides too many people have it turned off - what would my splash page look like to them if it's based in js?

So, I'd like to know if there's a way of doing this using the basics of CSS and HTML.


Sacharissa
____________________


Mind over matter is all very well,
but what about the fact that the mind IS matter?

Jen
20th June 12, 11:38 AM
PHP? I don't think html and css can reload image without javascript.

How about this:
http://demo.marcofolio.net/php_random_image_rotation/

meesa
20th June 12, 10:28 PM
If you just looking to randomize a picture, then create an array with all the URLs, then just use the random function to pick one of them.

So you might try something like:


picArray[rand()%count(picArray)]
/*OR*/
picArray[rand(0,count(picArray))]

Jen
21st June 12, 01:56 AM
There are two types - show new image or random images.