Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New to the CF scene
    Join Date
    Sep 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    HELP - SLIDEIT FUNCTION assigning a specific folder for my images

    hi,

    this would be my first time to write a javascript. i am trying to create a slideshow and here is what i came up based from my research. this only works if my .html file and images file are on the same folder. i was hoping that i could at least have a specific folder, like "images", that would only contain all the images.

    <html>
    <head>
    <script type="text/javascript">
    <!--
    var image1=new Image()
    image1.src="image001.jpg"
    var image2=new Image()
    image2.src="image002.jpg"
    var image3=new Image()
    image3.src="image003.jpg"
    //-->
    </script>
    </head>


    <body>
    <img src="image001.jpg" name="slideshow" width="360" height="288"/>

    <script>
    <!--
    //variable that will increment through the images
    var step=1
    function slideit(){
    //if browser does not support the image object, exit.
    if (!document.images)
    return
    document.images.slideshow.src=eval("image"+step+".src")
    if (step<3)
    step++
    else
    step=1
    //call function "slideit()" every 2.5 seconds
    setTimeout("slideit()",2500)
    }
    slideit()
    //-->
    </script>


    </body>
    </html>



    i hope you guys can help me here. this might be the easiest question but like what ive said, this would be my first time hehe

    thanks,
    bulinggitprojekt

  • #2
    Senior Coder
    Join Date
    Jul 2003
    Location
    My pimped-out igloo in Canadia
    Posts
    1,966
    Thanks
    36
    Thanked 0 Times in 0 Posts
    Hey

    I wont discourage you from learning, but if you want some premade slideshows there are many free ones available.

    I could toss you some links if you wanted
    Before you criticize someone, you should walk a mile in their shoes. That way, when you criticize them, you're a mile away and you have their shoes :)

  • #3
    New to the CF scene
    Join Date
    Sep 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hey canadianjameson,

    Thanks for the quick response. That would be very much appreciated if you could refer some links to make this easier.



    Quote Originally Posted by canadianjameson
    Hey

    I wont discourage you from learning, but if you want some premade slideshows there are many free ones available.

    I could toss you some links if you wanted

  • #4
    Regular Coder googleit's Avatar
    Join Date
    Jul 2006
    Location
    birmingham, uk
    Posts
    189
    Thanks
    0
    Thanked 0 Times in 0 Posts

  • #5
    New to the CF scene
    Join Date
    Sep 2006
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hey googleit,

    Thanks for the link. Will try it then

    Quote Originally Posted by googleit

  • #6
    Senior Coder
    Join Date
    Jul 2003
    Location
    My pimped-out igloo in Canadia
    Posts
    1,966
    Thanks
    36
    Thanked 0 Times in 0 Posts
    since there are so many, i figure I should ask "what exactly would you like it to do?"

    do you want it to be user-controllable, etc.

    these will be good starting-points:
    http://www.huddletogether.com/projects/lightbox2/
    http://www.dynamicdrive.com/dynamicindex4/index.html
    Before you criticize someone, you should walk a mile in their shoes. That way, when you criticize them, you're a mile away and you have their shoes :)


  •  

    Posting Permissions

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