Hi,
Could you try the following code. Just have a look at the array of images here.
I am not sure if this is the exact thing you are looking for.
<script type="text/javascript">
var imagelocation = "images/";
var currentdate = 0;
var image_number = 0;
function ImageArray (n) {
this.length = n;
for (var i =1; i <= n; i++) {
this[i] = ' '
}
}
image = new ImageArray(3)
image[0] = 'image1.gif'
image[1] = 'image2.gif'
image[2] = 'image3.gif'
var rand = 60/image.length
function GenerateRandomImage() {
currentdate = new Date()
image_number = currentdate.getSeconds()
image_number = Math.floor(image_number/rand)
return(image[image_number])
}
document.write("<img src="" + imagelocation + GenerateRandomImage()+ "">");
</script></img></script>
Also check this out :
http://www.robwalshonline.com/posts/jquery-plugin-random-image-on-page-load/[
^]
and
http://stackoverflow.com/questions/6930749/running-random-pictures-in-asp-net-site[
^]
Hope this helps!!
Regards,
Praneet