Hi people, I'm trying to make an ajax request, hoping for a clean json response to come up. Firefox, as usual, behaves like a charm, but when it comes to IE 6 and 7, it's the error function that's fired. $.ajax({ url: action, data: data, type: "GET", dataType: "json", error: function(msg) { alert("Error: " + msg); alert("URL: " + action); alert("DATA: " + data); }, success: function(reponse) { var result = eval("("+reponse+")"); alert(result); console.info(reponse); [... ...]
Using Charles Web DEbbuging Proxy, I started tracing what's happening when IE calls for ajax; here's what Charles says: { "totalPanier": "0,00€", "articles": [ { "id": "8a8b8d632481567f01248156fac90009", "prixAffiche": "0,00", "quantite": "0", "libelle": "Carte BEST CADEAUX à montant variable", "montantRemise": "", "prixTotal": "00,00€" }, { "id": "8a8b8d632481567f0124815706910010", "prixAffiche": "80,00", "quantite": "0", "libelle": "Carte BEST CADEAUX 80 Euros", "montantRemise": "", "prixTotal": "00,00€" }, { "id": "8a8b8d632481567f012481570578000f", "prixAffiche": "50,00", "quantite": "0", "libelle": "Carte BEST CADEAUX 50 Euros", "montantRemise": "", "prixTotal": "00,00€" }, { "id": "8a8b8d632481567f012481570549000e", "prixAffiche": "30,00", "quantite": "0", "libelle": "Carte BEST CADEAUX 30 Euros", "montantRemise": "", "prixTotal": "00,00€" }, { "id": "8a8b8d632481567f012481570364000d", "prixAffiche": "15,00", "quantite": "0", "libelle": "Carte BEST CADEAUX 15 Euros", "montantRemise": "", "prixTotal": "00,00€" } ] } That's ... JSON, perfectlly formated. Here's for the headers now: HTTP/1.1 200 OK Server Apache-Coyote/1.1 X-Powered-By Servlet 2.4; JBoss-4.0.3SP1 (build: CVSTag=JBoss_4_0_3_SP1 date=200510231054)/Tomcat-5.5 Content-Type application/json;charset=UTF-8 Content-Length 1221 Date Tue, 08 Dec 2009 18:41:05 GMT Woot! What the hell am I missing ? Thanks for the great help you could (and I hope, will) provide !!!