I am wanting to have slide shows of different albums on my page, the problem is it always shows the pictures from the last album coded to the page in the first album, and nothing in any album other than the first album. does anyone know how I can fix this? p.s. I didn't save the pictures to the wrong name or anything, I double checked. if there's only one slide show within the page it works perfect. I have my albums showing up in lightboxes but that didn't make a difference, I double checked that too.
you can see the page at http://solitaryharmony.com/main.html#images
click the links to see what I mean. If you want to see the whole page script for any interfering css or anything just rightclick and check my page source. here's a code example for my photo slide shows:
Pick an album from below:
<br /><a href = "javascript:void(0)" onclick = "document.getElementById('sh').style.display='block';document.getElementById('fade').style.display='block'">Solitary Harmony Album</a> (an album filled with only pictures used for Solitary Harmony)
<br /><a href = "javascript:void(0)" onclick = "document.getElementById('ed').style.display='block';document.getElementById('fade').style.display='block'">Graphic Art Album</a> (an album for pictures I have created that aren't specifically used for Solitary Harmony)
<div id="sh" class="white_content">
<script type="text/javascript">
var width = 565;
var height = 375;
var imgAr1 = new Array();
var rImg1 = new Array();
imgAr1[0] = "images/sh0.jpg";
imgAr1[1] = "images/sh1.jpg";
imgAr1[2] = "images/sh2.jpg";
imgAr1[3] = "images/sh3.jpg";
imgAr1[4] = "images/sh4.jpg";
imgAr1[5] = "images/sh5.jpg";
imgAr1[6] = "images/sh6.jpg";
imgAr1[7] = "images/sh7.jpg";
imgAr1[8] = "images/sh8.jpg";
imgAr1[9] = "images/sh9.jpg";
imgAr1[10] = "images/sh10.jpg";
imgAr1[11] = "images/sh11.jpg";
imgAr1[12] = "images/sh12.jpg";
imgAr1[13] = "images/sh13.jpg";
imgAr1[14] = "images/sh14.jpg";
imgAr1[15] = "images/sh15.jpg";
imgAr1[16] = "images/sh16.jpg";
imgAr1[17] = "images/sh17.jpg";
imgAr1[18] = "images/sh18.jpg";
imgAr1[19] = "images/sh19.jpg";
imgAr1[20] = "images/sh20.jpg";
imgAr1[21] = "images/sh21.jpg";
imgAr1[22] = "images/sh22.jpg";
imgAr1[23] = "images/sh23.jpg";
imgAr1[24] = "images/sh24.jpg";
imgAr1[25] = "images/sh25.jpg";
imgAr1[26] = "images/sh26.jpg";
imgAr1[27] = "images/sh27.jpg";
imgAr1[28] = "images/sh28.jpg";
imgAr1[29] = "images/sh29.jpg";
</script>
<table cellpadding=0 cellspacing=0><tr><td style="border: 2px double black;">
<img id=pic border=0>
</td></tr>
<tr><td>
<table width=100% style="border: 2px double #560f0f; font-size: 13px; font-family: verdana, arial;">
<td align=center><a style="color: black; cursor:pointer;" onclick="start()">First</a></td>
<td align=center><a style="color: black; cursor:pointer;" onclick="prev()">Prev</a></td>
<td align=center><a style="color: black; cursor:pointer;" onclick="slideshow()">Next</a></td>
<td align=center><a style="color: black; cursor:pointer;" onclick="end()">Last</a></td>
<td align=center><a style="color: #560f0f; cursor:pointer;" href = "javascript:void(0)" onclick = "document.getElementById('sh').style.display='none';document.getElementById('fade').style.display='none'">Close</a></td>
</tr></table>
</td></tr></table>
<script type="text/javascript">
for(var j = 0; j < imgAr1.length; j++)
{
rImg1[j] = new Image();
rImg1[j].src = imgAr1[j];
}
document.onload = setting();
var slide;
function setting()
{
slide = document.getElementById('pic');
slide.src = imgAr1[0];
slide.setAttribute("width",width);
slide.setAttribute("height",height);
}
//Image or picture slide show using java script
//slideshow function
var picture = 0;
function slideshow(){
if(picture < imgAr1.length-1){
picture=picture+1;
slide.src = imgAr1[picture];
}
}
function prev(){
if(picture > 0 ){
picture=picture-1;
slide.src = imgAr1[picture];
}
}
function start(){
slide.src = imgAr1[0];
picture = 0;
}
function end(){
slide.src = imgAr1[imgAr1.length-1];
picture = imgAr1.length-1
}
</script>
</div><div id="fade" class="black_overlay"></div>
<div id="ed" class="white_content">
<script type="text/javascript">
var width = 565;
var height = 375;
var imgAr1 = new Array();
var rImg1 = new Array();
imgAr1[0] = "images/ed0.jpg";
imgAr1[1] = "images/ed1.jpg";
imgAr1[2] = "images/ed2.jpg";
imgAr1[3] = "images/ed3.jpg";
imgAr1[4] = "images/ed4.jpg";
imgAr1[5] = "images/ed5.jpg";
imgAr1[6] = "images/ed6.jpg";
imgAr1[7] = "images/ed7.jpg";
imgAr1[8] = "images/ed8.jpg";
imgAr1[9] = "images/ed9.jpg";
imgAr1[10] = "images/ed10.jpg";
imgAr1[11] = "images/ed11.jpg";
imgAr1[12] = "images/ed12.jpg";
imgAr1[13] = "images/ed13.jpg";
imgAr1[14] = "images/ed14.jpg";
imgAr1[15] = "images/ed15.jpg";
imgAr1[16] = "images/ed16.jpg";
imgAr1[17] = "images/ed17.jpg";
imgAr1[18] = "images/ed18.jpg";
imgAr1[19] = "images/ed19.jpg";
imgAr1[20] = "images/ed20.jpg";
imgAr1[21] = "images/ed21.jpg";
imgAr1[22] = "images/ed22.jpg";
imgAr1[23] = "images/ed23.jpg";
imgAr1[24] = "images/ed24.jpg";
imgAr1[25] = "images/ed25.jpg";
imgAr1[26] = "images/ed26.jpg";
imgAr1[27] = "images/ed27.jpg";
imgAr1[28] = "images/ed28.jpg";
imgAr1[29] = "images/ed29.jpg";
imgAr1[30] = "images/ed30.jpg";
imgAr1[31] = "images/ed31.jpg";
imgAr1[32] = "images/ed32.jpg";
imgAr1[33] = "images/ed33.jpg";
imgAr1[34] = "images/ed34.jpg";
imgAr1[35] = "images/ed35.jpg";
imgAr1[36] = "images/ed36.jpg";
imgAr1[37] = "images/ed37.jpg";
imgAr1[38] = "images/ed38.jpg";
imgAr1[39] = "images/ed39.jpg";
imgAr1[10] = "images/ed40.jpg";
imgAr1[41] = "images/ed41.jpg";
imgAr1[42] = "images/ed42.jpg";
imgAr1[43] = "images/ed43.jpg";
</script>
<table cellpadding=0 cellspacing=0><tr><td style="border: 2px double black;">
<img id=pic border=0>
</td></tr>
<tr><td>
<table width=100% style="border: 2px double #560f0f; font-size: 13px; font-family: verdana, arial;">
<td align=center><a style="color: black; cursor:pointer;" onclick="start()">First</a></td>
<td align=center><a style="color: black; cursor:pointer;" onclick="prev()">Prev</a></td>
<td align=center><a style="color: black; cursor:pointer;" onclick="slideshow()">Next</a></td>
<td align=center><a style="color: black; cursor:pointer;" onclick="end()">Last</a></td>
<td align=center><a style="color: #560f0f; cursor:pointer;" href = "javascript:void(0)" onclick = "document.getElementById('ed').style.display='none';document.getElementById('fade').style.display='none'">Close</a></td>
</tr></table>
</td></tr></table>
<script type="text/javascript">
for(var j = 0; j < imgAr1.length; j++)
{
rImg1[j] = new Image();
rImg1[j].src = imgAr1[j];
}
document.onload = setting();
var slide;
function setting()
{
slide = document.getElementById('pic');
slide.src = imgAr1[0];
slide.setAttribute("width",width);
slide.setAttribute("height",height);
}
//Image or picture slide show using java script
//slideshow function
var picture = 0;
function slideshow(){
if(picture < imgAr1.length-1){
picture=picture+1;
slide.src = imgAr1[picture];
}
}
function prev(){
if(picture > 0 ){
picture=picture-1;
slide.src = imgAr1[picture];
}
}
function start(){
slide.src = imgAr1[0];
picture = 0;
}
function end(){
slide.src = imgAr1[imgAr1.length-1];
picture = imgAr1.length-1
}
</script>
</div><div id="fade" class="black_overlay"></div>