views:

149

answers:

1

I'm helping a colleague to code an html page that has to display contents (documents) of a local network share. Html page will not be served by any web server, it will be just a plain html page served by file system.

Does anyone know some javascript libraries that let users browse the share, listing files and folders?

thanks Michele

+1  A: 

No, it doesn't exist. Same origin policy makes this problematic.

If such a javascript existed it would have to be served by the system and port that the file share was on. Which sounds like it defeats the point.

Now there is an index listing service built into most web servers that can list the contents of a web folder for a browser. There is also a similar capability in the browser for ftp.

Paul
Thanks for your reply.I didn't understand when you say " it would to be served by the system and port that the file share was on". Can you explain it better?
systempuntoout
To clarify, it would have to be programmed as a firefox addon because a normal javascript would not be allowed by the browser to make the ajax calls that gather the information.
Paul
I don't get it.You can see network share as local file system simply mapping a drive to the share.Here http://stackoverflow.com/questions/1087246/can-javascript-access-a-filesystem you can see some example on how a simple html without web server can access local file system.
systempuntoout
The question you referenced has as its main answer a list of ways to get access to storage without actually accessing arbitrary files on the local file system. javascript is designed so that access to the filesystem is not part of its main support. If filesystem access was possible, just clicking web pages could hack files on disk. What you want to do might be possible as a firefox extension. Look at what s3fox does, for instance.
Paul