Accessing Local Files With JQuery
I believe that this question has been asked in a few different forms, but I've read quite a few different responses. At first, I had a web-application written with mostly jQuery t
Solution 1:
You can't just read a directory with JavaScript; however, there appears to be a way to "exploit" how browsers function using http://www.irt.org/articles/js014/. It may not be pretty, but the demo works in the latest Chrome and IE7-9 for me. I'm sure some of the techniques could be updated to use cleaner code if you'd like to improve upon it.
EDIT: Another technique you could use can be found in Javascript read files in folder
It definitely looks to be a cleaner solution. What I'd recommend is extracting the body contents to inject into a hidden div or using the path for an iframe that you can read from.
Post a Comment for "Accessing Local Files With JQuery"