How to list files in specified directory?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • CSS Newbie
    New Member
    • Dec 2010
    • 1

    How to list files in specified directory?

    So I want to use a javascript photo gallery widget I found...but it requires me to enter a comma delimited list of all the photo files I want to use.

    I want to show all the picture files within the specified directory without having to enumerate them (because the number and names of the photos will change often and this page will be replicated often for different directories).

    Is there a relatively easy (because I'm just learning) way to create a list of all picture files within the target directory and then assign that list to a javascript variable? That way I can use that variable in the widget in place of manually listing the files.

    ...or should I look for a different widget?

    Thanks!
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    This won't be possible with JavaScript (i.e. listing the files in a particular directory). You'll need a server-side language for this job.

    Comment

    Working...