Hello,
I have a slideshow script that has the following lines in the javascript:
var fadeimages=new Array()
fadeimages[0]=["images/1.jpg", "", ""]
fadeimages[1]=["images/2.jpg", "", ""]
fadeimages[2]=["images/3.jpg", "", ""]
--------------------------------------
I want to be able to use a loop, to create the array, with whatever number of lines as I need, to accomodate the number of images I have in the images directory .. ie:
Something like this ( Which Doesn't work .. because I have no idea what I am doing .. lol ?? )
var fadeimages=new Array()
for (i = 0; i <= 5; i++)
{
j=i+1
document.write("fadeimages[" + i + "]=[\"images/" + j + ".jpg\", \"\", \"\"]")
document.write("<br>")
}
????
Thank You
Joe
I have a slideshow script that has the following lines in the javascript:
var fadeimages=new Array()
fadeimages[0]=["images/1.jpg", "", ""]
fadeimages[1]=["images/2.jpg", "", ""]
fadeimages[2]=["images/3.jpg", "", ""]
--------------------------------------
I want to be able to use a loop, to create the array, with whatever number of lines as I need, to accomodate the number of images I have in the images directory .. ie:
Something like this ( Which Doesn't work .. because I have no idea what I am doing .. lol ?? )
var fadeimages=new Array()
for (i = 0; i <= 5; i++)
{
j=i+1
document.write("fadeimages[" + i + "]=[\"images/" + j + ".jpg\", \"\", \"\"]")
document.write("<br>")
}
????
Thank You
Joe