Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. javascript for slideshow is not working in firefox

javascript for slideshow is not working in firefox

Scheduled Pinned Locked Moved ASP.NET
javascriptdata-structurestoolshelpquestion
5 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    suzzain
    wrote on last edited by
    #1

    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.

    N H 2 Replies Last reply
    0
    • S suzzain

      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.

      N Offline
      N Offline
      N a v a n e e t h
      wrote on last edited by
      #2

      Install firebug and debug the JS. That is the way to go. :)

      Navaneeth How to use google | Ask smart questions

      S 1 Reply Last reply
      0
      • N N a v a n e e t h

        Install firebug and debug the JS. That is the way to go. :)

        Navaneeth How to use google | Ask smart questions

        S Offline
        S Offline
        suzzain
        wrote on last edited by
        #3

        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.

        C 1 Reply Last reply
        0
        • S suzzain

          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.

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          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

          1 Reply Last reply
          0
          • S suzzain

            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.

            H Offline
            H Offline
            httplover
            wrote on last edited by
            #5

            setTimeout filters function is not supple

            living none stoping.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups