Possible Duplicate:
How to read and write into file using JavaScript
javascript functions for file manipulations like reading & writing ? Im looking for word by word file reading & appending each word in an array of strings.
Possible Duplicate:
How to read and write into file using JavaScript
javascript functions for file manipulations like reading & writing ? Im looking for word by word file reading & appending each word in an array of strings.
On the server. Try using node.js
.
In particular read the File System documentation.
As for the Browser: You cannot access the file system through a browser.
Using HTML5 however, there is a File reading API you can use to ask a user to open a file then read it using JavaScript.
The MDC has some information
JavaScript is a client-side language, and as such it runs on the client of the user viewing your site and running your script. You can't access server files directly from JavaScript, and can't access client files at all.
However, HTML5 introduces some storage options if that can fit your needs.