Okay so I got this txt file that I'm reading from the wamp local server,
I make changes to this text and try to send it back to the file
the ajax request fires the success function but the file doesn't change, any ideas? thanks
Code:
var customCss = "";
var customCssPath = "http://localhost:8081/userThemer/styles/custom.css";
var newStyle ="newwww";
$.ajax({
type: 'POST',
url: customCssPath,//url of receiver file on server
data: newStyle, //your data
success: function () {
console.log("YAY !");
},
error: function () {
console.log(":'(");
},
dataType: "text" //text/json...
});
0 comments:
Post a Comment