views:

104

answers:

4

Hi all, i was wondering if anyone knew a quick solution to my problem. I want to be able to open a folder on users screen pretty much the same as but just opening up the my computer folder so a user can drag a file onto the browser screen. anyone know how?

+3  A: 

You can't. They even gave this bug a name: "security".

The closest you can get without using Flash, proprietary browser stuff or Java is something like this.

Boldewyn
A: 

You have to use a java applet.

Javascript has no access to the file system for security reason.

Every page would be able to see the files on your local machine and might display: "According to the files on your disk you might be interested in some of our special movies ;)"

Ghommey
A: 

Incidentally, there are custom extensions in IE and Firefox that let you load and save files; it's the reason TiddlyWiki can work as it does. It does degrade a Java applet for other browsers.

A new jQuery plugin has been extracted out of TiddlyWiki to give Javascript authors the ability to load and save, and it's portable across all browsers:

twFile - http://jquery.tiddlywiki.org/twFile.html

It's quite possibly not what you're after as it will only work off a file:/// URL.

mahemoff
A: 

Instead of an applet you can also consider flash (actionscript aka swf) for a better user experience.

BalusC