I'm trying to send some FormData via a simple jquery ajax GET/Post
but for some reason my formData is not getting set right. I end up with ?[object%20FormData]
as my payload.
I'm a bit new to this FormData stuff, but I was able to use it successfully with file uploads no problem using this same technique... Here's what I'm doing with my specified values I want to send:
I should note: I'm not using any form
element to grab these values from.
var data = new FormData();
data.append("date", curDate);
data.append("serviceID", sID);
data.append("attSummID", asID);
data.append("totalCount", 0);
data.append("visitorCount",0);
data.append("reset",false);
$.ajax({
url: '/4DACTION/WEB_ServiceCounts/',
processData: false,
contentType: false,
data: data,
dataType: 'json',
type: 'GET',
success: function(response){
console.log(response);
},
error: function(jqXHR, textStatus, errorThrown){
alert('ERRORS: ' + textStatus);
}
});
Any tips?