Randomize Photo Shown
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.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)