View Full Version : "Randomizing" Images

01-14-2004, 11:57 PM
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, 09: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, 10:35 AM
This is only an example, it selecs between 6 pictures (0.jpg-5.jpg)

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