Hey people,
I was just wondering if anyone could give me a sense of direction for this applicaiton. Im pretty new to java
but i basically want to see if there is a way to manage images in a banner rotation.
So far, i can get my webpage to rotate x amount of images, in a random sequence each time the page loads.
I want to see if there is a way to add a managment feature so that i can simply add new images to the rotation
Im thinking i may have to use an array or a new variable for each of the images.
here is my code
CODE
script type="text/javascript" language="JavaScript">
NumberOfImagesToRotate = 6; // MAY BE USE A VARIABLE for file names here ???
// Specify the first and last part of the image tag.
FirstPart = '<img src="/Headers/header';
LastPart = '.jpg" height="134" width="806">';
function printImage() {
var r = Math.ceil(Math.random() * NumberOfImagesToRotate);
document.write(FirstPart + r + LastPart);
}
/script>
Each image is currently names 1,2,3,4,5.jpg etc...
Any ideas ..i know it can be done through VB but i want to use java
thanks