Newbie question on slideshows

Discussion in 'Javascript' started by Stephan Hauduc, Jul 16, 2003.

  1. I want a script that 'automatically' reads the number of files in a dir and
    and then shows them in sequence.

    Basically I have a program that outputs jpg's as slide1.jpg, slide2.jpg,
    etc.and I would like a script that automatically finds how many slides there
    are and plays a slideshow of them.

    Ideally as well I'd like to be able to set different time lenghts that the
    different slides are displayed for (maybe with these times in an external
    text file, if this is possible then the number of slides in the dir will not
    have to be auto detected but could be put into a parameter, and included at
    the top of the timing file).

    I have programmed many times before, but am a complete javascript noobie and
    have no idea of how to do this - I'd really appreciate any help.

    TIA

    Chris Dean
     
    Stephan Hauduc, Jul 16, 2003
    #1
    1. Advertisements

  2. Stephan Hauduc

    Grant Wagner Guest

    JavaScript can not retrieve a list of files available on the server in a
    cross-browser, cross-platform manner. You could possibly use a Java Applet to
    retrieve the list <url:
    http://www.galasoft-lb.ch/myjava/WebLoadFile/Demo/Demo.html /> or use a
    server-side technology to pass a list of files to client-side JavaScript.

    There is one other alternative. If you web server provides a list of files in a
    directory when there is no index.html present, you could load that into an
    iframe and parse the results, although most web servers are configured to not
    allow directory browsing.

    --
    | Grant Wagner <>

    * Client-side Javascript and Netscape 4 DOM Reference available at:
    *
    http://devedge.netscape.com/library/manuals/2000/javascript/1.3/reference/frames.html

    * Internet Explorer DOM Reference available at:
    *
    http://msdn.microsoft.com/workshop/author/dhtml/reference/dhtml_reference_entry.asp

    * Netscape 6/7 DOM Reference available at:
    * http://www.mozilla.org/docs/dom/domref/
    * Tips for upgrading JavaScript for Netscape 6/7 and Mozilla
    * http://www.mozilla.org/docs/web-developer/upgrade_2.html
     
    Grant Wagner, Jul 16, 2003
    #2
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Similar Threads
Loading...