mancava pure una parentesi. usa il debugger dei browser non andare a tentonicodice:var xhr = new XMLHttpRequest(); method = "GET"; url = "notifiche.php?notifica=1"; xhr.open(method, url, true); xhr.onreadystatechange = function (){ // non entra qui dentro if(xhr.readyState === 4 && xhr.status === 200){ var oggetto = JSON.parse(xhr.responseText); } } xhr.send();