#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Posts
    2
    Rep Power
    0

    Angry netscape error jvscript


    Hi everyone,
    I have a problem with the script :

    <!-- Begin
    // Set slideShowSpeed (milliseconds)
    var slideShowSpeed = 7000;
    // Duration of crossfade (seconds)
    var crossFadeDuration = 10;
    // Specify the image files
    var Pic = new Array();
    // to add more images, just continue
    // the pattern, adding to the array below

    Pic[0] = 'pic1.gif'
    Pic[1] = 'pic2.gif'
    Pic[2] = 'pic3.gif'
    Pic[3] = 'pic4.gif'
    Pic[4] = 'pic5.gif'
    Pic[5] = 'pic6.gif'
    Pic[6] = 'pic7.gif'
    Pic[7] = 'pic8.gif'
    Pic[8] = 'pic9.gif'
    Pic[9] = 'pic10.gif'
    Pic[10] = 'pic11.gif'
    Pic[11] = 'pic12.gif'

    // do not edit anything below this line
    var v;
    var s = 0;
    var y = Pic.length;
    var breLoad = new Array();
    for (i = 0; i < y; i++) {
    breLoad[i] = new Image();
    breLoad[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 = breLoad[s].src;
    if (document.all) {
    document.images.SlideShow.filters.blendTrans.Play();
    }
    s = s + 1;
    if (s > (y - 1)) s = 0;
    v = setTimeout('runSlideShow()', slideShowSpeed);
    }
    // End -->
    </SCRIPT>

    it works perfect when i try to work this script in Explorer and Netscape when i don't use no other scripts on the same page.
    If i try to use it with a scroll down javascript menu in the same page it gives me an error like :

    line 46 ----> which is ( document.images.SlideShow.src = breLoad[s].src; )
    document.images.SlideShow has no properties.


    It does not give any property errors before this line i guess that is interesting and i could not understand why this line is crucial.

    If there is something to help me i will be really pleased.
    Thanx a lot...
  2. #2
  3. No Profile Picture
    Clueless llama
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Feb 2001
    Location
    Lincoln, NE. USA
    Posts
    2,353
    Rep Power
    117
    You want the html/javascript forum

IMN logo majestic logo threadwatch logo seochat tools logo