I understand this question is asked a lot but the distinction here is I HAVE WEB SECURITY DISABLED.
I am creating a webapp that will never be hosted anywhere, to access the user runs chrome --disable-web-security --user-data-dir [webappdirectoryhere]
I understand how unorthodox this is but it's just for a small project.
I am using this ajax to access a local file (this wouldn't work in chrome unless you have a server running or you just disable web security like I have):
function loadDoc(){
$.ajax({url: "ajax_info.txt", success: function(result){
var variablesArray = result.split(" ");
}});
}
So my question is this - can I do something like this but for writing instead of reading?
EDIT: So what I really want is a function that does the inverse of that ajax. And to write something like (variable1 + " " + variable2) Note: I want to overwrite, not append.
See Question&Answers more detail:os