This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes Directory Chooser Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Directory Chooser" Watch "Directory Chooser" New topic

Directory Chooser

John Eric Hamacher
Ranch Hand

Joined: Apr 25, 2007
Posts: 230
I'm looking for a directory chooser for my JSP. The control would simply allow the user to select the name of a directory (not a file) and have that name be available to pass to a servlet. Note I just want the name of a directory, so there should be no security issues, right?

Does anybody know of a Javascript library that could accomplish this? Thanks.

Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 60752

JavaScript has no access to the client file system, so there can be no library that does this. The closest you can get is the file input control which will let you choose a file, but not a folder.

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: Directory Chooser
Similar Threads
DirectoryChooser - How?
FileFilter() accepts if File.isDirectory()
NX: Starting Server and Specifying DB Location
JFileChooser, FileDialog
directory retreival