2
I’m having a problem returning ajax with jsonp, it returns json, but I can’t work with it.
Code:
$.ajax({
method: "GET",
url: "http://minasul.tecnologia.ws/previsao/index.php?tipo=TODAS",
async: false,
contentType: "application/json",
dataType: 'jsonp',
success: function(json) {
//QUANDO USO O SUCCESS, ELE NÃO ENTRA AQUI NESSE BLOCO
//QUANDO USO O COMPLETLE, ELE ENTRA, MAS NÃO CONSIGO TRABALHAR COM O JSON
}
});
blz.. I put!
– Alisson de Pádua
What happens if you leave the
dataType: 'json'
and remove thecontentType
?– KaduAmaral
so... he from the bug Cros Domain.... you saw that he returns the json blzinha?
– Alisson de Pádua
Good crowd... I have solved the problem by ultilizing this link http://www.geekality.net/2010/06/27/php-how-to-easily-provide-json-and-jsonp/
– Alisson de Pádua