alvar
08-17-2003, 07:19 PM
this is killing me!
i have an image that is chosen randomly,
that is also used to display other images on mousing over a link. My question is, does anyone know how to get back the random image that was originally displayed?
function displayRandom()
{
var img_name = new Array("images/random/1.jpg", "images/random/2.jpg",
"images/random/3.jpg", "images/random/4.jpg")
var l = img_name.length;
var rnd_no = Math.round((l-1)*Math.random());
document.thumb.src = img_name[rnd_no];
}
i have an image that is chosen randomly,
that is also used to display other images on mousing over a link. My question is, does anyone know how to get back the random image that was originally displayed?
function displayRandom()
{
var img_name = new Array("images/random/1.jpg", "images/random/2.jpg",
"images/random/3.jpg", "images/random/4.jpg")
var l = img_name.length;
var rnd_no = Math.round((l-1)*Math.random());
document.thumb.src = img_name[rnd_no];
}