Results 1 to 2 of 2

Thread: Drop-down list from file directory

  1. #1
    Join Date
    May 2007
    Location
    Central U.S.A.
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Post Drop-down list from file directory

    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

  2. #2
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

    Default

    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

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •