I want to use jQuery $.ajaxto make a POST call to send some information (via POST, for example: page.aspx?var1=value....).
But I also want jQuery to process that the service returns JSON, so that I return a JSON object.
var data = {name: _name, ...};
var request = $.ajax({
url: url,
type: "post",
data: data,
});
As soon as I use dataType: "json", which allows me to get a JSON object, I get a parseerror on request!
I hope you can help me with this!
THANKS IN THE RECOMMENDATIONS!
source
share