Question : slideshow  does not work in firefox

Can anyone help me with the attached code?
It works in IE but not in Firefox.
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
126:
127:
128:
129:
130:
131:
132:
<html>
<head>
<title>test</title>
<SCRIPT type=text/javascript>

// The list of images to display in the slideshow
//creating a array of the image object
var image=new Array(<%if not RSobjekter("img1") = "intet-billede.jpg" then%>"images/objekter/<%=(RSobjekter("img1").Value)%>"<%end if%>
                    <%if not RSobjekter("img2") = "intet-billede.jpg" then%>,"images/objekter/<%=(RSobjekter("img2").Value)%>"<%end if%>
                    <%if not RSobjekter("img3") = "intet-billede.jpg" then%>,"images/objekter/<%=(RSobjekter("img3").Value)%>"<%end if%>
                    <%if not RSobjekter("img4") = "intet-billede.jpg" then%>,"images/objekter/<%=(RSobjekter("img4").Value)%>"<%end if%>
                    <%if not RSobjekter("img5") = "intet-billede.jpg" then%>,"images/objekter/<%=(RSobjekter("img5").Value)%>"<%end if%>
                    <%if not RSobjekter("img6") = "intet-billede.jpg" then%>,"images/objekter/<%=(RSobjekter("img6").Value)%>"<%end if%>
                    <%if not RSobjekter("img7") = "intet-billede.jpg" then%>,"images/objekter/<%=(RSobjekter("img7").Value)%>"<%end if%>
                    <%if not RSobjekter("img8") = "intet-billede.jpg" then%>,"images/objekter/<%=(RSobjekter("img8").Value)%>"<%end if%>
                    <%if not RSobjekter("img9") = "intet-billede.jpg" then%>,"images/objekter/<%=(RSobjekter("img9").Value)%>"<%end if%>
                    <%if not RSobjekter("img10") = "intet-billede.jpg" then%>,"images/objekter/<%=(RSobjekter("img10").Value)%>"<%end if%>
                    <%if not RSobjekter("img11") = "intet-billede.jpg" then%>,"images/objekter/<%=(RSobjekter("img11").Value)%>"<%end if%>
                    <%if not RSobjekter("img12") = "intet-billede.jpg" then%>,"images/objekter/<%=(RSobjekter("img12").Value)%>"<%end if%>
                    <%if not RSobjekter("img13") = "intet-billede.jpg" then%>,"images/objekter/<%=(RSobjekter("img13").Value)%>"<%end if%>
                    <%if not RSobjekter("img14") = "intet-billede.jpg" then%>,"images/objekter/<%=(RSobjekter("img14").Value)%>"<%end if%>
                    <%if not RSobjekter("img15") = "intet-billede.jpg" then%>,"images/objekter/<%=(RSobjekter("img15").Value)%>"<%end if%>
                    <%if not RSobjekter("img16") = "intet-billede.jpg" then%>,"images/objekter/<%=(RSobjekter("img16").Value)%>"<%end if%>
                    <%if not RSobjekter("img17") = "intet-billede.jpg" then%>,"images/objekter/<%=(RSobjekter("img17").Value)%>"<%end if%>
                    <%if not RSobjekter("img18") = "intet-billede.jpg" then%>,"images/objekter/<%=(RSobjekter("img18").Value)%>"<%end if%>
                    <%if not RSobjekter("img19") = "intet-billede.jpg" then%>,"images/objekter/<%=(RSobjekter("img19").Value)%>"<%end if%>
                    <%if not RSobjekter("img20") = "intet-billede.jpg" then%>,"images/objekter/<%=(RSobjekter("img20").Value)%>"<%end if%>
                    )
                
//variable that will increment through the images
var num=0

// set the delay between images
var timeDelay
 
//preload the images in the cache so that the images load faster
//create new instance of images in memory 

var imagePreload=new Array()
for (i=0;i<image.length;i++)
{
   imagePreload[i]=new Image()
// set the src attribute
imagePreload[i].src=image[i]
}

//function to get the previous image in the array
function previous_image()
{  
  //code to execute only when the automatic slideshow is disabled 
   if (slideshow.checked==false)
   {
    if (num>0)
    {
       num--
      
       //set the SRC attribute to let the browser load the preloaded images 
       document.images.slideShow.src=image[num] 
     }
    if (num==0)
    {  //if first image is displayed
       num=image.length
       num--
       
       document.images.slideShow.src=image[num] 
    } 
  }  
}

//function to get the next image in the array
function next_image()
{ 
  //code to execute only when the automatic slideshow is disabled 
  if (slideshow.checked==false)
  {
    if (num<image.length)
    {
       num++
       //if last image is reached,display the first image
       if (num==image.length) 
       num=0
       
        //set the SRC attribute to let the browser load the preloaded images 
       document.images.slideShow.src=image[num]   
    }
  } 
}

//for automatic Slideshow of the Images
function slideshow_automatic()
{ 
if (slideshow.checked)
   {
    if (num<image.length)
     {
       num++
       //if last image is reached,display the first image
       if (num==image.length) 
       num=0
       
       //sets the timer value to 4 seconds,we can create a timing loop by using the setTimeout method
       timeDelay=setTimeout("slideshow_automatic()",6000) 
       document.images.slideShow.src=image[num]   
     }
   }  
   if (slideshow.checked==false)
   { 
     //Cancels the time-out that was set with the setTimeout method. 
      clearTimeout(timeDelay)
   }
}

</SCRIPT>
</head>
<body>
<div align="center">
                          <br />

                          
                          
                        <SCRIPT>
document.write('<img src="'+image[0]+'" name="slideShow" style="filter:revealTrans(duration=2,transition=23)" width=425 border=0>')


</SCRIPT></center>
      <p align="center"><strong><span class="indholdstekst">
        <input type="hidden" name="slideshow" value="OFF" onClick="slideshow_automatic()">
      </span></strong>
        <input name="Previous" type="button" class="bundtekst" onclick="previous_image();return false" value=" &lt;&lt;  " />
        <input name="Next" type="button" class="bundtekst" onClick="next_image();return false" value="  &gt;&gt; "></div>
</body>
</html>

Answer : slideshow  does not work in firefox

I have simplified it since you do not need to ask if it should be autorun anymore
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
<html>
<head>
<title>test</title>
<SCRIPT type=text/javascript>

// The list of images to display in the slideshow
//creating a array of the image object
var autoRun = true; // set the autoRun
var delay = 6; // seconds

var image=new Array(
"http://www.huddletogether.com/projects/lightbox2/images/image-1.jpg",
"http://www.huddletogether.com/projects/lightbox2/images/image-2.jpg",
"http://www.huddletogether.com/projects/lightbox2/images/image-3.jpg"
)

//variable that will increment through the images
var num=0

// set the delay between images
var timeDelay

//preload the images in the cache so that the images load faster
//create new instance of images in memory

var imagePreload=new Array()
for (i=0;i<image.length;i++)
{
   imagePreload[i]=new Image()
// set the src attribute
imagePreload[i].src=image[i]
}

//function to get the previous image in the array
function previous_image()
{
    if (num>0)
    {
       num--

       //set the SRC attribute to let the browser load the preloaded images
       document.images.slideShow.src=image[num]
     }
    if (num==0)
    {  //if first image is displayed
       num=image.length
       num--

       document.images.slideShow.src=image[num]
    }
}

//function to get the next image in the array
function next_image()
{
    if (num<image.length)
    {
       num++
       //if last image is reached,display the first image
       if (num==image.length)
       num=0

        //set the SRC attribute to let the browser load the preloaded images
       document.images.slideShow.src=image[num]
    }
}
var tId = "";
window.onload=function() {
  if (autoRun) tId=setInterval('next_image()',delay*1000)
}
</SCRIPT>
</head>
<body>
<div align="center">
                          <br />



                        <SCRIPT>
document.write('<img src="'+image[0]+'" name="slideShow" style="filter:revealTrans(duration=2,transition=23)" width=425 border=0>')


</SCRIPT></center>
      <p align="center"><strong><span class="indholdstekst">
      </span></strong>
        <input name="Previous" type="button" class="bundtekst" onclick="previous_image();return false" value=" &lt;&lt;  " />
        <input name="Next" type="button" class="bundtekst" onClick="next_image();return false" value="  &gt;&gt; "></div>
</body>
</html>
Random Solutions  
 
programming4us programming4us