I tried to open file with
window.open("file:///D:/Hello.txt");
The browser does not allow opening of local file this way, probably for security reasons. I want to use the file's data in the client side. How can I read local file in javascript?
I tried to open file with
window.open("file:///D:/Hello.txt");
The browser does not allow opening of local file this way, probably for security reasons. I want to use the file's data in the client side. How can I read local file in javascript?
Maybe you could try using flash if you want to handle client side data :
An example : http://www.adylevy.com/index.php/2009/06/07/client-side-image-resize-flash-cs4-filereferencedata/
It is not possible. Either you use a web server where file can be uploaded and than use its content or write an extension for browser.
You can't. new browsers like firefox, safari etc. block 'file' protocole. it will only work on old browsers.
you'll have to upload files you want.
The HTML5 fileReader facility ( http://dev.w3.org/2006/webapi/FileAPI/ ) does allow you to process local files, but these MUST be selected by the user, you cannot go rooting about the users disk looking for files.
I currently use this with development versions of Chrome (6.x). I don't know what other browsers support it.