1

I'm new to web development and I already got stuck with my first try. I want the user to be able to select a directory and then list all the files in it. The user should then be able to display the file contents by just clicking on the name in the list. (I want to do it in angular JS but for now plain JS is fine too).

I found this http://www.w3.org/TR/FileAPI/ where the user can select multiple files (I'd rather like the user to be able to select the folder and then just list all files). Now what I couldn't manage to get done is that the user can select one of those files in the list and then display the content of the file. I'm not sure if i understood it correctly from other posts if this is even possible.

Best regards, jan

Jan
  • 337
  • 1
  • 2
  • 11

1 Answers1

0

Honestly, it can not be done in JavaScript. So don't waste your time to try it. If you really want to do it then use Java Applets or Active-X control (works only with IE).

Useful links for reference:

With Applet

With Active X

Community
  • 1
  • 1
BabyDuck
  • 1,249
  • 1
  • 9
  • 22
  • Ok thanks. I switched to vaadin framework where it was quite easy to achieve. I saw that they were using an ActiveXObject but I cannot much say about the internal conversion to JS that happens in vaadin. – Jan Apr 09 '15 at 09:05