Results 1 to 2 of 2

Thread: Randomize Photo Shown

  1. #1
    Join Date
    Jul 2012

    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?



  2. #2
    Join Date
    Aug 2012
    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.
    one of my toys And my repository and my old self ranting plus a bonus Getting the most out of Q/A sites
    Code that is 100% standards compliant is 100% correct 100% of the time... anything else is just a hack

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center