Pretty much what the title suggests. I am building a basic html page for my website, and there are several people involved in the music. I want to stick an image in the upper left hand corner, and I thought a fun idea would be to randomize what image it sticks in when the page loads. I figure it would make the page a little more interesting, and it was also a good way to not bruise any egos. I imagine some sort of javascripting is involved, which isn’t too bad, I’ve dabbled around with it before. However, like most things, the less mumbo jumbo involved, the better.
Do it with Javascript, do it right in the web page. You can do it right away, yourself. What browsers don’t support Javascript now? As for PHP–it certainly can work except that most ISP’s that only offer simple web-space do not allow any server-side scripting at all, they just let you use disk space.
The only reason that the PHP would be necessary is if you wanted to hide the images from alternate means of viewing them. By hot-linking, or by people just entering the image’s address into their web browsers, for example.
~
Include a no-script set of tags that just display a static image.
Then if the user has javascript disabled they will still see a pic, but it won’t be randomised.
no-script tags are used by the browser when javascript is disabled.
So you kind of get the best of both worlds.