Hi there people
Ok so i'm really confused with what i need to do here...I want to use VBscript in ASP
Ive created some javascript that will generate a random number and from that it will
select an image...named image1, image2, image3 etc......
I really want to create something so that i can add more pictures to it without having to redo the
code side of things. i.e. I just want to add images in the directory and make the code adapt.
Im using a variable to store the amount of images to rotate.. should i use an array..
can you add variables to an array without having to declare the array again ??
and what if i delete a picture the number in that array will still be there but an error will show , right ???
im a lil confused as you may tell. ..
here is my java
CODE
ImagesToRotate = 6;
FirstPart = '<img src="/Headers/image';
LastPart = '.jpg" height="134" width="806">';
function printImage() {
var r = Math.ceil(Math.random() * ImagesToRotate);
document.write(FirstPart + r + LastPart);
}