Hi all,
I'm trying to develop a javascript to display a few images in a div. The plan is to get two pictures which will act as next/last image, but I'm stuck for running the script when the page loads, which is using the onLoad function in the body tag.
function slideshow(src)
{
var picture=new Array();
picture[0]="package1.jpg";
picture[1]="package2.jpg";
var active=0;
document.getElementById('packages').innerHTML="<img src=\"+ picture[0] +\">";
}
So now, the code finds the div, but it has a problem accessing the location of the Array. I've hardcoded it in, when I attempted to see if it was the structure of the code. How do I fix it? Looks like it's ignoring the + signs, which I thought were to add variables.
Cheers,