dcsimg
www.webdeveloper.com
Results 1 to 6 of 6

Thread: JS SlideShow Script II

  1. #1
    Join Date
    May 2013
    Posts
    3

    JS SlideShow Script II

    Hello,

    I was wondering if anyone has used this script before (it's posted on **Link Removed**). I am using it for web gallery, however cannot adjust cross fade duration no matter what value I put in. Any suggestions on how to make it work properly would be greatly appreciated. Or if there is a better script to use, for that matter.

    Thanks.
    ICE QUEEN

  2. #2
    Join Date
    Nov 2011
    Location
    Dallas, TX
    Posts
    369
    It'd be better to post the actual script contents since there were several in the link you have posted.

  3. #3
    Join Date
    May 2013
    Posts
    3
    Here is the actual script:


    <!-- THREE STEPS TO INSTALL JS SLIDESHOW SCRIPT II:



    1. Copy the coding into the HEAD of your HTML document

    2. Add the onLoad event handler into the BODY tag

    3. Put the last coding into the BODY of your HTML document -->



    <!-- STEP ONE: Paste this code into the HEAD of your HTML document -->



    <HEAD>



    <!-- This script and many more are available free online at -->

    <!-- The JavaScript Source!! http://www.javascriptsource.com -->

    <!-- (C) 2000 www.CodeLifter.com -->

    <!-- Web Site: http://www.codelifter.com -->

    <script>

    // =======================================

    // set the following variables

    // =======================================



    // Set slideShowSpeed (milliseconds)

    var slideShowSpeed = 5000



    // Duration of crossfade (seconds)

    var crossFadeDuration = 3



    // Specify the image files

    var Pic = new Array() // don't touch this

    // to add more images, just continue

    // the pattern, adding to the array below



    Pic[0] = '/image-effects/slideshow1_1.jpg'

    Pic[1] = '/image-effects/slideshow1_2.jpg'

    Pic[2] = '/image-effects/slideshow1_3.jpg'

    Pic[3] = '/image-effects/slideshow1_4.jpg'

    Pic[4] = '/image-effects/slideshow1_5.jpg'



    // =======================================

    // do not edit anything below this line

    // =======================================



    var t

    var j = 0

    var p = Pic.length



    var preLoad = new Array()

    for (i = 0; i < p; 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

    if (document.all){

    document.images.SlideShow.filters.blendTrans.Play()

    }

    j = j + 1

    if (j > (p-1)) j=0

    t = setTimeout('runSlideShow()', slideShowSpeed)

    }

    </script>



    </HEAD>



    <!-- STEP TWO: Insert the onLoad event handler into your BODY tag -->



    <BODY onLoad="runSlideShow()">



    <!-- STEP THREE: Copy this code into the BODY of your HTML document -->



    <!-- This script and many more are available free online at -->

    <!-- The JavaScript Source!! http://www.javascriptsource.com -->

    <!-- Original: CodeLifter -->

    <!-- Web Site: http://www.codelifter.com -->

    <table border="0" cellpadding="0" cellspacing="0">

    <tr>

    <td id="VU" height=150 width=150>

    <img src="slideshow1_1.jpg" name='SlideShow' width=150 height=150></td>

    </tr>

    </table>



    <p><center>

    <font face="arial, helvetica" size"-2">Free JavaScripts provided<br>

    by <a href="http://javascriptsource.com">The JavaScript Source</a></font>

    </center><p>



    <!-- Script Size: 2.62 KB -->

  4. #4
    Join Date
    May 2006
    Location
    Somewhere behind your screen
    Posts
    1,671
    what browser are you running this page in? )) well, this script is ancient and it works only in IE. you should find a crossbrowser gallery script instead. try some of these scripts
    Last edited by Padonak; 05-03-2013 at 03:45 AM.

  5. #5
    Join Date
    May 2013
    Posts
    3
    I am using IE9. The website is not actually live yet, I am trying to build it in MS Expression Web 2. I will check these scripts, thank you for suggesting it.

  6. #6
    Join Date
    May 2006
    Location
    Somewhere behind your screen
    Posts
    1,671
    if (document.all){some code} in human language means if(your browser is IE){do something} and other browsers will ignore everything inside the {brackets}. avoid such scripts if you want to create a good website

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