PDA

View Full Version : Drop-down list from file directory



uzeljc
05-18-2007, 05:59 PM
Before I start, I am aware of some of the security risk of directly accessing a directory or folder from a browser.

I am looking for javascript that will read all the items within a specific directory, write them to a txt. Then, another javascript can getFile from that txt and list them out in a drop-down menu for users to select and be linked to the correct item.

i.e.
Script 1)reads folder content then writes txt
Script 2)read txt content then generates selectable drop-down menu

boogyman
05-18-2007, 06:48 PM
I am looking for javascript that will read all the items within a specific directory, write them to a txt. Then, another javascript can getFile from that txt and list them out in a drop-down menu for users to select and be linked to the correct item.

javascript is an interpreted client-side language, and I do not believe it is possible for it to access files on the server


see if your host supports php, then it would be very easily accomplished, by doing some research into the fopen and fclose functions