I have 4 images. When the page loads I want to display the first image, then, when the page loads again (refreshed by the user), display the next image, and so on. Can someone help me with the script to do this.
@JPnycOct 06.2004 — #I'll tell you how you have to proceed. 1st off, use a session variable/ Then you create an array with the 4 pics, and an index, which will be the session variable. Call the function onload, increment the session variable each pass.
@David_HarrisonOct 06.2004 — #If you're not bothered about the order that the images appear in, something like the script I've attached would do nicely.
There's a noscript tag to cater for those who do not have JavaScript enabled and then there is an empty paragraph (which the image gets put into).
You can add images to the array by using the addImage function. The addImage function has four arguements and they are as follows:
* The image source
* The image width
* The image height
* The images alternate text
All four are REQUIRED otherwise the script will throw a wobbler.