Basically, I have a very simple website where the root directory looks like:
/images/
index.html
stuff.js
I want some way to recursively it
Perhaps the best way to do this is to use a server-sided language to do it for you, and to use an asynchronous Javascript request to display the data.
This sample uses PHP to list all the files in a specified directory, and an xmlhttprequest
to load this output and convert the results into image tags:
getimages.php:
index.html (same directory as getimages.php):
Image List Thing
Note that this is only an example. You'll probably want to make sure that the AJAX call is successful, and that the JSON conversion works both in the server code and on the client.