I am looking for an existing javascript code that would display a file selector from the data provided by the server.
- JavaScript will only use a file selector dialog box to allow access
to the filesystems the user has access to locally (e.g. hard drive,
CDs, mounted network volumes...). You could therefore not display one
from the webpage itself to access your server.
- You could make a DOM-based one which basically would looki like a
file selector but in reality be cleverly designed HTML, and that also
means sending back the directory listings with the script. You could
use AJAX/XMLHttpRequest to request the directory listings dynamically
of you wanted. Obviously, this is a long-winded way of doing things;
but it is possible. Fish around for "file selector" with optional
keywords AJAX, DOM, HTML
- Other options include using Java applets etc... mass-programming
your way through the problem what. Is it really a required feature or
an esthetic would-like-to-have one?
If you can give the user access to your server (eg via FTP etc) they
could add your server directory to their network places in Windows, or
mounted volumes in Linux/Unix. Then they could browse your folder from
the web page in a file selector dialog. My guess is, however, that
once they have system access to your server
1/ they don't need to operate from the page
2/ it becomess a major security issue.
So yeah, that's possible too, but don't do it. Unless it's for a
corporate intranet and have an absolute necessity to do it that way.