M
matt
I have an image randomizer that was working fine. I added five images to it
today, and none of the new five are ever called. Here's the script:
<!-- Begin
var theImages = new Array()
theImages[0] = '../pros_stu_pics/prospective2.jpg'
theImages[1] = '../pros_stu_pics/23x.jpg'
theImages[2] = '../pros_stu_pics/28xx.jpg'
theImages[3] = '../pros_stu_pics/15x.jpg'
theImages[4] = '../pros_stu_pics/16x.jpg'
theImages[5] = '../pros_stu_pics/24x.jpg'
theImages[6] = '../pros_stu_pics/gral_info.jpg'
theImages[7] = '../pros_stu_pics/admit_1.jpg'
theImages[8] = '../pros_stu_pics/admit_2.jpg'
theImages[9] = '../pros_stu_pics/admit_3.jpg'
theImages[10] = '../pros_stu_pics/admit_4.jpg'
theImages[11] = '../pros_stu_pics/admit_5.jpg'
var j = 0
var p = theImages.length;
var preBuffer = new Array()
for (i = 0; i < p; i++){
preBuffer = new Image()
preBuffer.src = theImages
}
var whichImage = Math.round(Math.random()*(p-1));
function showImage(){
document.write('<img src="'+theImages[whichImage]+'">');
}
// End -->
and the call script:
<!-- Begin
showImage();
// End -->
All of the new files have been uploaded to the right directory. Can anyone
tell what's wrong?
today, and none of the new five are ever called. Here's the script:
<!-- Begin
var theImages = new Array()
theImages[0] = '../pros_stu_pics/prospective2.jpg'
theImages[1] = '../pros_stu_pics/23x.jpg'
theImages[2] = '../pros_stu_pics/28xx.jpg'
theImages[3] = '../pros_stu_pics/15x.jpg'
theImages[4] = '../pros_stu_pics/16x.jpg'
theImages[5] = '../pros_stu_pics/24x.jpg'
theImages[6] = '../pros_stu_pics/gral_info.jpg'
theImages[7] = '../pros_stu_pics/admit_1.jpg'
theImages[8] = '../pros_stu_pics/admit_2.jpg'
theImages[9] = '../pros_stu_pics/admit_3.jpg'
theImages[10] = '../pros_stu_pics/admit_4.jpg'
theImages[11] = '../pros_stu_pics/admit_5.jpg'
var j = 0
var p = theImages.length;
var preBuffer = new Array()
for (i = 0; i < p; i++){
preBuffer = new Image()
preBuffer.src = theImages
}
var whichImage = Math.round(Math.random()*(p-1));
function showImage(){
document.write('<img src="'+theImages[whichImage]+'">');
}
// End -->
and the call script:
<!-- Begin
showImage();
// End -->
All of the new files have been uploaded to the right directory. Can anyone
tell what's wrong?