0

I've managed to read from a file on my computer using the $.get() method. I know that Chrome doesn't allow reading from file but Firefox does. I was wondering, is there a way to write on a file using the $.post() method or any other method? Thank you very much!

EDIT: I've arledy read that question and they say that you can't read from file, but I did that thanks to Firefox. So I wanted to ask another question to see if writing on a file is really impossible.

Here is my $.get() code:

$.get('words.italian.txt',function(txt){
    var ris=[];
    var lines = txt.split("\r\n");
    var j=0;
    for (var i = 0, len= lines.length; i < len; i++) {
        if(lines[i].length==parola.length){
            ris[j]=lines[i];
            j++;
        }
    }
}

I haven't made any attempt on writing with $.post() but i think that it's possible.

ddev
  • 65
  • 1
  • 9
  • Would you mind the code which you tried so far for both $.get and $.post – SK. Jan 03 '18 at 16:07
  • 1
    Possible duplicate of [Read/write to file using jQuery](https://stackoverflow.com/questions/582268/read-write-to-file-using-jquery) – cognophile Jan 03 '18 at 16:09

0 Answers0