views:

69

answers:

3

How do I load a list of files from a specified folder in javascript?

update

Actually is from a Xul application, but I think anything for a local html file will work.. (it's a standalone app). And are resource files (images) I'm talking about..

A: 

If you're talking about JS in a browser and accessing files on the client's machine, you can't. Javascript has no access to the filesystem for security reasons.

Daniel Vandersluis
no, it isn't, please, see my update..
Tom Brito
A: 

What do you mean by "Load" them? Are they .js files or .css files that you want to add to the DOM of a webpage?

J J
they are image resources..
Tom Brito
A: 

It's possible within a Firefox plug-in and has been for years. See the following page on MDC: https://developer.mozilla.org/en/Code_snippets/File_I%2F%2FO

Tim Down