On my webpage I have a textarea where admins can enter html and then save it to display on the page for non-admins. I tried transferring the saved html text to the php just like any other variable I have every sent over ajax, but for whatever reason, html is not allowed to be sent as a GET parameter. My ajax reguest is below
function saveNotesToDBAjax(textBoxValue, buildName){
var urlString = "saveNotesToDBAjax.php?Build=" + buildName + "&Text=" + textBoxValue;
function testAjax() {
return $.ajax({
url: urlString
});
}
var promise = testAjax();
promise.success(function (data) {
//alert(data);
console.log(data);
});}
The above variable "textBoxValue" is the variable that will hold html. Is there anyway to get around this problem? Also, the error my console is showing says "GET (then lists my url) 403 error"
Thanks in advanced!
A web server may return a 403 Forbidden HTTP status code in response to a request from a client for a web page or resource to indicate that the server can be reached and understood the request, but refuses to take any further action.So the problem is for sur in the format of your query string, use charlietfl and david advices => use POST