View Full Version : "Randomizing" Images

01-15-2004, 12:57 AM
Please go here to view an example of what I'm speaking of:


If you refresh the page, the images and game advertisement at the top of the screen should change. It appears then that these images are 'randomized'. How is this accomplished? Can you set the rate at which each image appears?

Thanks to anyone who replies. :)

01-15-2004, 10:50 AM
This isn't JavaScript or any other client-side language doing this. It's a server-side language called PHP. It probably works by generating a random number and then using it to pick a couple of images out of an array to create the header of the page.

01-15-2004, 11:35 AM
This is only an example, it selecs between 6 pictures (0.jpg-5.jpg)

document.write('<img src="'+I+'.jpg";>');