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.