Ver Mensaje Individual
  #1 (permalink)  
Antiguo 15/06/2015, 02:41
Avatar de AngelMarine
AngelMarine
 
Fecha de Ingreso: enero-2014
Ubicación: Madrid
Mensajes: 79
Antigüedad: 10 años, 3 meses
Puntos: 0
Pregunta Problema con XMLHttpRequest

Hola, me sale el siguiente aviso:

Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help, check http://xhr.spec.whatwg.org/.

Los scripts son:

ConstructorXMLHttpRequest.js
function ConstructorXMLHttpRequest() {
if(window.XMLHttpRequest) {
return new XMLHttpRequest();
}
else if(window.ActiveXObject) {
var versionesObj = new Array(
'Msxml2.XMLHTTP.5.0',
'Msxml2.XMLHTTP.4.0',
'Msxml2.XMLHTTP.3.0',
'Msxml2.XMLHTTP',
'Microsoft.XMLHTTP'
);
for (var i = 0; i < versionesObj.length; i++) {
try {
return new ActiveXObject(versionesObj[i]);
}
catch (errorControlado) {}
}
}
throw new Error("No se pudo crear el objeto XMLHttpRequest");
}


index.php (solo el script)
....etc
<script language="JavaScript" type="text/javascript">
var peticion01 = null;
peticion01 = new ConstructorXMLHttpRequest();
function Coger(url)
{
if(peticion01)
{
peticion01.open(\'GET\', url, false);
peticion01.send(null);
document.getElementById(\'resultado\').innerHTML = peticion01.responseText;
}
}
</script>
...etc

Antes funcionaba, ahora me sale dicho error, ¿Qué sucede?