Question about JavaScript

This is a discussion on Question about JavaScript within the Tech Board forums, part of the Community Boards category; I need a script that will act like a type of photo album. I have a little corner of my ...

  1. #1
    #include <me!> Flakster's Avatar
    Join Date
    May 2005
    Location
    Canada
    Posts
    50

    Question about JavaScript

    I need a script that will act like a type of photo album.

    I have a little corner of my website where I want (every 8-10 seconds) a new picture to appear. It doesn't have to fade or anything. Anyone already have something like that written?

  2. #2
    Bob Dole for '08 B0bDole's Avatar
    Join Date
    Sep 2004
    Posts
    618
    www.lumberspecialties.com I did that site, just gank the code.

    edit- here it is
    Code:
    <SCRIPT LANGUAGE="JavaScript">
    
    <!-- Begin
    // Set slideShowSpeed (milliseconds)
    var slideShowSpeed = 1650;
    // Duration of crossfade (seconds)
    var crossFadeDuration = 1;
    // Specify the image files
    var Pic = new Array();
    // to add more images, just continue
    // the pattern, adding to the array below
    
    Pic[0] = 'images/facility/1.jpg'
    Pic[1] = 'images/facility/2.jpg'
    Pic[2] = 'images/facility/3.jpg'
    Pic[3] = 'images/facility/4.jpg'
    Pic[4] = 'images/facility/5.jpg'
    Pic[5] = 'images/facility/6.jpg'
    Pic[6] = 'images/facility/7.jpg'
    Pic[7] = 'images/facility/8.jpg'
    Pic[8] = 'images/facility/9.jpg'
    Pic[9] = 'images/facility/10.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);
    }
    //  End -->
    </script>
    
    <body onLoad='"runSlideShow()">
    Hmm

  3. #3
    5|-|1+|-|34|) ober's Avatar
    Join Date
    Aug 2001
    Posts
    4,429
    If you did that site, you have an error in your gallery (view.php not found).

  4. #4
    Super Moderater.
    Join Date
    Jan 2005
    Posts
    374
    I found this site personally very useful when I was building my own website. Also the link to the Dhtml website is just as good.

    The explanations are clear and easy to follow. If you are using microsoft frontpage you should find it really simple to implement and change if need be.

    http://javascriptkit.com/script/cutindex21.shtml

    good luck

  5. #5
    Bob Dole for '08 B0bDole's Avatar
    Join Date
    Sep 2004
    Posts
    618
    yah I know ober, I don't really care to fix it, long story

    edit: wait, what are u talking about, gallery works, the thing for the mill cuts doesnt. I deleted the dir with all those files accidentally
    Hmm

  6. #6
    5|-|1+|-|34|) ober's Avatar
    Join Date
    Aug 2001
    Posts
    4,429
    If I go into the gallery and click on a picture to get a closer look, it gives me an error.

  7. #7
    #include <me!> Flakster's Avatar
    Join Date
    May 2005
    Location
    Canada
    Posts
    50
    Thanks for the help guys.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. JavaScript book recommendations
    By neandrake in forum Tech Board
    Replies: 2
    Last Post: 04-05-2009, 01:27 PM
  2. another do while question
    By kbpsu in forum C++ Programming
    Replies: 3
    Last Post: 03-23-2009, 01:14 PM
  3. Replies: 2
    Last Post: 03-10-2009, 09:36 PM
  4. Question...
    By TechWins in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 07-28-2003, 10:47 PM
  5. opengl DC question
    By SAMSAM in forum Game Programming
    Replies: 6
    Last Post: 02-26-2003, 09:22 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21