If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Randomize Photo Shown

Hi all

Im currently updating my website www.industrial-revolution.net. For anyone that clicked on that you can clearly see that its outdated by about 20 years so its in desperate need for reform. Im currently working on having a large image below my menu bar that runs along the top of the site on my index page.

I would like to have 3-5 images that display in the 1024x600px box. Each time the home page is opened I want one of the 3-5 images to be seen. So the image shown should change on each refresh and only one of the images should display at a time. Does anyone have any idea how to do this?

I would do it server side. Put the list of images in an array, and then just generate a container for the image and set the source of the image to one of the array elements using a random as the index of the array.