javascript for slideshow is not working in firefox
-
Hi I want to make slideshow of four images. The javascript for slideshow is
<script language="JavaScript" type="text/javascript"> var slideShowSpeed = 5000; var crossFadeDuration = 3; var Pic = new Array(); var PicUrl = new Array(); var PicCaption = new Array(); Pic[0] = 'images/image1.jpg'; Pic[1] = 'images/image2.jpg'; Pic[2] = 'images/image3.jpg'; Pic[3] = 'images/image4.jpg'; PicUrl[0] = '#'; PicUrl[1] = '#'; var PageNav='#'; var m_intTimeOut; var j = 0; var m_intArrayLen = Pic.length; var preLoad = new Array(); for (i = 0; i < m_intArrayLen; i++) { preLoad[i] = new Image(); preLoad[i].src = Pic[i] } function runSlideShow(){ if (document.all){ document.images.SlideShow.style.filter="blendTrans(duration=2)"; document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)"; document.images.SlideShow.filters.blendTrans.Apply(); } document.images.SlideShow.src = preLoad[j].src; PageNav=PicUrl[j]; if (document.all){ document.images.SlideShow.filters.blendTrans.Play(); } j = j + 1; if (j > (m_intArrayLen-1)) j=0 m_intTimeOut = setTimeout('runSlideShow()', slideShowSpeed); } function pg_nav() { window.location.href=PageNav; } </script>
In the body I have called the runslideshow function.<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onload="runSlideShow();">
The images are displayed in the image tag with id=” SlideShow”<td><a href="states.aspx?page=1"> <img src="images/image1.jpg" name="SlideShow" id="SlideShow" width="579" height="145" border="0" alt=""/></a></td>
This code is running fine in internet explporer but not working in firfox. Please help me. -
Hi I want to make slideshow of four images. The javascript for slideshow is
<script language="JavaScript" type="text/javascript"> var slideShowSpeed = 5000; var crossFadeDuration = 3; var Pic = new Array(); var PicUrl = new Array(); var PicCaption = new Array(); Pic[0] = 'images/image1.jpg'; Pic[1] = 'images/image2.jpg'; Pic[2] = 'images/image3.jpg'; Pic[3] = 'images/image4.jpg'; PicUrl[0] = '#'; PicUrl[1] = '#'; var PageNav='#'; var m_intTimeOut; var j = 0; var m_intArrayLen = Pic.length; var preLoad = new Array(); for (i = 0; i < m_intArrayLen; i++) { preLoad[i] = new Image(); preLoad[i].src = Pic[i] } function runSlideShow(){ if (document.all){ document.images.SlideShow.style.filter="blendTrans(duration=2)"; document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)"; document.images.SlideShow.filters.blendTrans.Apply(); } document.images.SlideShow.src = preLoad[j].src; PageNav=PicUrl[j]; if (document.all){ document.images.SlideShow.filters.blendTrans.Play(); } j = j + 1; if (j > (m_intArrayLen-1)) j=0 m_intTimeOut = setTimeout('runSlideShow()', slideShowSpeed); } function pg_nav() { window.location.href=PageNav; } </script>
In the body I have called the runslideshow function.<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onload="runSlideShow();">
The images are displayed in the image tag with id=” SlideShow”<td><a href="states.aspx?page=1"> <img src="images/image1.jpg" name="SlideShow" id="SlideShow" width="579" height="145" border="0" alt=""/></a></td>
This code is running fine in internet explporer but not working in firfox. Please help me.Install firebug and debug the JS. That is the way to go. :)
Navaneeth How to use google | Ask smart questions
-
Install firebug and debug the JS. That is the way to go. :)
Navaneeth How to use google | Ask smart questions
-
Hi Navaneeth , Thanks for giving this idea. i have installed the debugger bt im unable to debug my javascript. My javascript is on the aspx page and is called on body's onload event. How ill debug it.
It's incredibly easy, and there are pages explaining how to use firebug. Of COURSE the JS is in your aspx page. You set a breakpoint, refresh the page, and it will stop and you can step through.
Christian Graus Driven to the arms of OSX by Vista. "! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums. I can do things with my brain that I can't even google. I can flex the front part of my brain instantly anytime I want. It can be exhausting and it even causes me vision problems for some reason. - CaptainSeeSharp
-
Hi I want to make slideshow of four images. The javascript for slideshow is
<script language="JavaScript" type="text/javascript"> var slideShowSpeed = 5000; var crossFadeDuration = 3; var Pic = new Array(); var PicUrl = new Array(); var PicCaption = new Array(); Pic[0] = 'images/image1.jpg'; Pic[1] = 'images/image2.jpg'; Pic[2] = 'images/image3.jpg'; Pic[3] = 'images/image4.jpg'; PicUrl[0] = '#'; PicUrl[1] = '#'; var PageNav='#'; var m_intTimeOut; var j = 0; var m_intArrayLen = Pic.length; var preLoad = new Array(); for (i = 0; i < m_intArrayLen; i++) { preLoad[i] = new Image(); preLoad[i].src = Pic[i] } function runSlideShow(){ if (document.all){ document.images.SlideShow.style.filter="blendTrans(duration=2)"; document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)"; document.images.SlideShow.filters.blendTrans.Apply(); } document.images.SlideShow.src = preLoad[j].src; PageNav=PicUrl[j]; if (document.all){ document.images.SlideShow.filters.blendTrans.Play(); } j = j + 1; if (j > (m_intArrayLen-1)) j=0 m_intTimeOut = setTimeout('runSlideShow()', slideShowSpeed); } function pg_nav() { window.location.href=PageNav; } </script>
In the body I have called the runslideshow function.<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onload="runSlideShow();">
The images are displayed in the image tag with id=” SlideShow”<td><a href="states.aspx?page=1"> <img src="images/image1.jpg" name="SlideShow" id="SlideShow" width="579" height="145" border="0" alt=""/></a></td>
This code is running fine in internet explporer but not working in firfox. Please help me.