www.webdeveloper.com
Results 1 to 4 of 4

Thread: Rotate Images in Folder

  1. #1
    Join Date
    Feb 2003
    Posts
    102

    Rotate Images in Folder

    Hi All,

    I need a script that can read all of the images in a folder (into an array?) and then rotate those images. Preferably in alphabetic order but that's not essential.

    I have found a script that rotates images exactly how I would want them rotating here...
    http://javascript.internet.com/image...cript--ii.html

    ...but unfortunately I would need to specify the images manually in that script. I just want to be able to add or remove whatever photos I want from the target folder, and those are the photos that will appear in the slideshow.

    I have seen other scripts read images in a folder and show them all on a page using Javascript, however, my attempts to combine these scripts has not yielded any results! Does anyone know how to modify the script above so it just rotates all of the images in a certain folder? Or otherwise, does anyone know of a script that does what I'm after?

    I know this can be done with PHP but I specifically do not want a PHP page as the page needs to be search engine friendly.

    Any help / info / points-in-the-right-direction would be greatly appreciated!


    Cheers,

    Chris


    PS: Looks like someone else has been after the same thing once before!...
    http://www.webdeveloper.com/forum/sh...d.php?t=108314

  2. #2
    Join Date
    Mar 2005
    Location
    Sydney, Australia
    Posts
    7,974
    JavaScript can't read files so the only way you can build the list of images automatically is if you have a server side language build the list in the JavaScript for you.
    Stephen

  3. #3
    Join Date
    Feb 2008
    Posts
    59
    Hi, If you don't want the actual page to be php, then you could use php to build a javascript file, containing the filenames in an array, that is linked to the main page using a script tag.
    Also, just in case you're not aware, the script you are pointing to uses IE's blendTrans, so doesn't fade between images in Firefox. If you need a cross browser script try: http://www.astral-consultancy.co.uk/...doco.cgi?11530

    Hope this helps

  4. #4
    Join Date
    Feb 2003
    Posts
    102
    Thanks for the help felgall and budster!

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