I need to make a page that with the use of javascript would automatically make an index with <img> tags pointing to the files in a directory. The beauty of this would be that I could just simply move a file to a directory to add it to the list instead of constantly modifying the html. It needs to just be able to read from its own directory would be find and list every file in it. (or even better every *.jpg;*.gif;*.bmp)
Sergey Smirnov
02-03-2003, 11:02 PM
Server site: To get such functionality, you need just turn the web server to allow access to directory structure. In this way, the server returns the index of the directory as an html page. Each server has own design for this index page. For example, for Apache: http://www.doceram.com/images/news/app/
If existing design is suitable for you, you have nothing to do on server site any more. When put new image into directory, it appears in the list immediately.
Client site: just point to URL of the directory and it appears in browser. You can click on any image to see it. if it is enough for you, the job is done. If you want you can load directory index into frame, iframe or layer. In this way you can customize the design of the page with directory list (but not list design itself).
The solution above is a simplest way to it. Of cause, you can write a small server site application to make whatever you want