I am looking for a script that will make a new image appear on page when
refresh or reload appears. Here is an example of such a page
http://www.vanderbilt.edu/
Thanks, I really appreciate this newsgroup. Dick Ross
This will use client-side processing to obtain a random picture.
To begin with, make a folder in your webpage folder (eg "pics") and
the possible pictures you want in there, naming them pic01.jpg,
pic02.jpg, pic03.jpg etc. The script assumes that you are using *.jpg
format for your pictures.
<script language="JavaScript">
function ChooseImage() {
var pics="10"; //REPLACE THIS WITH THE NO OF PICS YOU HAVE
var num;
var path;
num = Math.round(Math.random() * pics) + 1;
path = "pics/pic" + num + ".jpg"
document.write('<img src="' + path + '" name="Picture "' + num
+ '">');
}
</script>
Then put this where you want to put the image:
<script language="JavaScript">
ChooseImage;
</script>
Jonathan.