I understand javascript is not designed for file manipulation due to security concerns. However, recently I figured out a way to read files using firefox. Is there a way to write to a file as well?
I found the following two potential solutions:
- How to enable local javascript to read/write files on my PC?
- https://developer.mozilla.org/en/Code_snippets/File_I%2F%2FO
However, since I am extremely inexperienced in this matter I did not figure out how to use either of them. Could anyone provide a very basic example please?
Thanks
Edit: I tried to use 1. to write to a file, but it work here is what I wrote:
- WritingJS.html: http://pastebin.com/ZSztcgNx
- selfcontainedmap2.js: http://pastie.org/3391242
My firefox is a clean install of Firefox 8, hence there shouldn't be any addon conflicts I suppose.