Newbie question on slideshows

S

Stephan Hauduc

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
 
G

Grant Wagner

Stephan said:
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

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 <[email protected]>

* 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
 

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. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top