views:

72

answers:

4

how can I write and read files in JavaScript?

Is it possible?

+3  A: 

JavaScript running in a web page displayed in a browser cannot access the client file system.

John Saunders
A: 

according to this article is possible, but i never tried it before. http://www.c-point.com/JavaScript/articles/file_access_with_JavaScript.htm

Hery
@Hery: did you _read_ that article? It says you can't do it with only JavaScript.
John Saunders
A: 

It's impossible without using a JavaScript extension, or something like ActiveX.

Rev316
+1  A: 

There are APIs developing to make this possible. For instance, Firefox 3.6 has a File API (see active demo), and the W3C has a working draft.

Matthew Flaschen