View Full Version : Slide Show with "Dynamic Array"

10-31-2004, 09:35 PM
I was wondering if it's possible to do a Slide Show (with DHTML and/or Java Scripts) that will build it's list of images automatically by just specifying the path rather than having to hard-code all of the image names or having to name them 1.jpg, 2.jpg, 3.jpg etc...

I have a Visual Basic Slide Show that does this on my PC. I just point it to the folder (with a bat file) and, whenever I start it, it scans that folder for any *.bmp, *.jpg or *.gif file and builds a new table. It even counts them and has a progress bar!

It sure would be nice if I could just upload images and have them included in the Slide Show without me having to keep manually updating it.

11-01-2004, 02:42 PM
Please please everyone, use the default forum font.

Anyway, no, I don't believe that a script could scan for these files. It would certainly be a helpful feature and make them a lot easier to set up, but for now, we seem to be stuck with the chore of entering filenames.

(It's nice to find someone else who codes in VB.. I use VB.NET as part of VS.NET 2004 Professional (which I am proud to say isn't warezed :p.) My current project is published on my site (see sig))


11-04-2004, 08:49 PM
Well, JavaScript unfortuanately can't look into a user's harddrive or folders in any way. However, if your files are all named in sequential order, such as "img-1.gif", "img-2.gif", etc, you can certainly modify the script to anticipate that and not have to enter each file name into the script. You'll need to also let the script know how many images there are total, so it knows where things end (ie: image-15.gif).