I am trying to put text with each picture in the slideshow, but I would like to integrate with the script that I already have. This script works by referancing this peice of html: <img name='slide' src='picture.gif'>. The problem is, I don't know how to refernce where I want the text to go.
This is the script that I'm using:
// begin dHTML SlideShow Script
if(document.images) {
currentslide=1;
maxslides=23;
image = new Array(maxslides+1);
for(var n=1;n<=maxslides;n++) {
image[n]=new Image(400,300);
image[n].src='images/aslide-'+n+'.jpg';
}
}
function prevSlide() {
if(document.images) {
currentslide--;
if(currentslide<1) currentslide=maxslides;
document.images['slide'].src=image[currentslide].src;
}
}
function nextSlide() {
if(document.images) {
currentslide++;
if(currentslide>maxslides) currentslide=1;
document.images['slide'].src=image[currentslide].src;
}
}
// end dHTML SlideShow Script
What should I add to pull the text from an array with the same number as the image and how to I get it to display in html?
alien-e
This is the script that I'm using:
// begin dHTML SlideShow Script
if(document.images) {
currentslide=1;
maxslides=23;
image = new Array(maxslides+1);
for(var n=1;n<=maxslides;n++) {
image[n]=new Image(400,300);
image[n].src='images/aslide-'+n+'.jpg';
}
}
function prevSlide() {
if(document.images) {
currentslide--;
if(currentslide<1) currentslide=maxslides;
document.images['slide'].src=image[currentslide].src;
}
}
function nextSlide() {
if(document.images) {
currentslide++;
if(currentslide>maxslides) currentslide=1;
document.images['slide'].src=image[currentslide].src;
}
}
// end dHTML SlideShow Script
What should I add to pull the text from an array with the same number as the image and how to I get it to display in html?
alien-e