vendredi 17 octobre 2014

jquery ajax JSON parse error firefox


Vote count:

0




So this one is very strange. My application has a ton of ajax calls, but for some reason only one of them doesnt work, and it only doesnt work in firefox. I checked the network tab, and the headers are sent as normal, but there is no response when I check the response tab. The error message that comes up from the error callback reads "SyntaxError: JSON.parse: unexpected end of data at line 1 column 1 of the JSON data." Again, it works fine in chrome and IE and I have a bunch of other similar ajax calls that work in firefox. What could be the problem?


Here is the code:



$.ajax({
url: 'php_helpers/pnm_profile_helper.php',
type: 'POST',
processData: false,
contentType: false,
data: (data),
dataType: 'json',
success: function(response){
(code)
},
error: function(s, error, errorThrown){
alert(s+'\n'+ error+'\n'+ errorThrown);
}
});


asked 1 min ago







jquery ajax JSON parse error firefox

Aucun commentaire:

Enregistrer un commentaire