File Browser in javascript
Status: New User - Welcome
Joined: 25 Apr 2005
Posts: 3
Reply Quote
I'm facing a situation in which I have no server side programming support. But have to implement an html page that displays the folders/files present at a particular location on the server. These files may be modified/added. As such the page should dynamically diisplay them.

The client wants to upload his company profile, logo, images, brochures and other related docs on the server. He doesn't have server side support. He wants that an html page (called downloads.htm) should display the all the files in that directory.

Is there a way in Javascript to do so.
The filenames and other attributes can be retrieved at the server and a javascript array could be sent to the browser which in turn displays the data in html forms.
Back to top
Status: Contributor
Joined: 30 May 2004
Posts: 148
Reply Quote
Javascript has no access to the file system of any computer. That's for security reasons.

What you are asking for requires server side scripting, end of story.

Move the site to a server with server scripting support, they are cheap.

If you require server side scripting then you have to have server side scripting, HTML is a static language, and Javascript only runs inside a restricted space, in this case the client browser.

In no case would javascript be able to access the file system of the server, since it only runs on the client side.

Your requirements are for server side scripting support, and only server side scripting can do that, save your mental energy and stop trying to find a solution for a problem that has many easy solutions as long as you use the right technologies, in this case, server side scripting.

There is no other way to do that, tell your client to stop being silly.
Back to top
Display posts from previous:   

All times are GMT - 8 Hours