www.webdeveloper.com
Results 1 to 3 of 3

Thread: Firefox slideshow not working

  1. #1
    Join Date
    May 2006
    Posts
    3

    Exclamation Firefox slideshow not working

    My slideshow works in IE but not in Mozilla Firefox. Any ideas why? Thank you for any help

    Here's the script:

    <head>
    <Script Language=JavaScript>

    var slideShowSpeed1 = 4000;

    var currIMG1 = 0;

    var Pic1 = new Array()
    Pic1[0] = 'http://www.creativecosmos.org/classicgalleries/Cartoons1-50/1.jpg'
    Pic1[1] = 'http://www.creativecosmos.org/classicgalleries/Cartoons1-50/2.jpg'
    Pic1[2] = 'http://www.creativecosmos.org/classicgalleries/Cartoons1-50/3.jpg'
    Pic1[3] = 'http://www.creativecosmos.org/classicgalleries/Cartoons1-50/4.jpg'


    var nPix1 = Pic1.length-1;
    var preLoad1 = new Array()
    for (i=0; i<nPix1+1; i++)
    {
    preLoad1[i] = new Image()
    preLoad1[i].src = Pic1[i]
    }

    function runSlideShow1(){

    SlideShow1.style.filter="blendTrans(duration=1)";
    SlideShow1.filters.blendTrans.Apply();
    SlideShow1.src = preLoad1[currIMG1].src;
    SlideShow1.filters.blendTrans.Play();
    currIMG1++
    if (currIMG1 > (nPix1)){currIMG1=0}
    setTimeout('runSlideShow1()',slideShowSpeed1);
    }

    function init(){

    runSlideShow1();
    }

    window.onload=init;

    </Script></head>

    <body>
    <Table border="0" cellpadding="0" cellspacing="0" align="center">
    <TR>
    <TD>
    <img src="slideshow1_1.jpg" id='SlideShow1' width=432 height=432>
    </TD>
    </TR>
    </Table></body>

  2. #2
    Join Date
    Jun 2006
    Location
    Ontario
    Posts
    163
    The reason this isn't working is because it's using innerHTML to reference the page elements, or at least some deprecated techniques that aren't being used anymore. Firefox adheres to W3C standards, so you'd have to use the document object model to get your references, ie-document.getElementById()

    Basically I recommend just finding different code for your slideshow... something a bit more up-to-date.

  3. #3
    Join Date
    May 2006
    Posts
    3

    Thank you

    Thank you kindly.

    Amy

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles