Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 555
  • Last Modified:

Javascript To Build Treeview of Client-Side Directory and its Sub-Directories

Hi All,

Is there any way, given a starting directory, to use Javascript to build a treeview type menu of that directory, its sub-directories and the files therein? No server-side scripting will be used - it's strictly DHTML.

Thanks,

Lou
0
ACE-ITFLA
Asked:
ACE-ITFLA
  • 4
  • 2
1 Solution
 
msfletchCommented:
There are really two parts to your question:

1) How to create a tree view?

Pretty easy, see:

http://www.treeview.net/tv/instructions.asp

2) How to read files from a user's directory structure.

You will need more than just Javascript to accomplish this. See related threads:

http://www.webmasterworld.com/javascript/3351786.htm


0
 
msfletchCommented:
b0lsc0tt,

I would like to be considered for the points. Even though my answer wasn't exactly how to do it (impossible with multi-browser supported Javascript only), it was quick and correct on each point. Some times "It can't be done." is a correct answer.
0
 
b0lsc0ttCommented:
msfletch,
Thanks for your response and contribution here and to EE.  I appreciate it and did consider your comment for points.  I have reread it now and my problem is with the second part.  It isn't clear.  The part you typed doesn't clearly say it can't be done.  The forum comments you linked to aren't a clear, specific answer to this and also don't seem to have a clear conclusion.  Because IE was used as a tag and the Asker didn't make it clear whether this was an Internet page or not there is the chance it actually can be done.  The solution would be IE only and not work for a page on the Internet trying to read local files but it could be an answer in this case based on the little info you were provided by the Asker.
If you are interested in I will be glad to explain my thoughts more and even provide a suggestion or two.  The real unfortunate thing here is the Asker never responded which probably would've provided you a chance to get more details and provide a clear and complete answer for the second part.  As an expert here I know what it is like to be in your shoes.
Let me know if you have a question about this reply or are interested in anymore from me.  I hope this explanation helps you know why I recommended what I did.  Remember a third party will actually close this so your objection and any response you post will be read by them.  They don't always go with the CV's recommendation when there is an objection.  No matter what happens here thanks for your contribution and efforts.  I know EE appreciates them. :)
b0lsc0tt
EE Cleanup Volunteer
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
msfletchCommented:
Point well taken. The asker did not say that other browsers needed to be supported. As you said, it would have been nice to have had some response to my answer so I could clarify. =)
0
 
b0lsc0ttCommented:
msfletch,
I am glad you assumed the answer needed to be supported by all browsers though.  Keep doing that.  Some experts will post a "solution" that is browser specific and not mention that very important limitation.  It is also easy to overlook what is in the tags, I have done it before too.  Like you said, a response would've made a big difference but I wanted to make sure you didn't misread some of what I said and stop doing the good things you did here.  It really was a good start and I won't be upset if the Mod/Admin who closes this decides against my recommendation.  I hope we continue to see you around and good luck. :)
b0lsc0tt
EE Cleanup Volunteer
0
 
msfletchCommented:
Thanks B0lsc0tt!
0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now