Skip to content
Snippets Groups Projects
Commit 689ff53b authored by Regis Houssin's avatar Regis Houssin
Browse files

Fix: ajout vérification sur la fonction loadXMLDoc

parent 2ffe5b97
No related branches found
No related tags found
No related merge requests found
......@@ -261,10 +261,6 @@ function loadXMLDoc(url,readyStateFunction,async)
req = new XMLHttpRequest();
if (req.overrideMimeType) {
req.overrideMimeType('text/xml');
}
if (!req) {
alert('Cannot create XMLHTTP instance');
return false;
}
req.onreadystatechange = readyStateFunction;
req.open("GET", url, async);
......@@ -276,6 +272,10 @@ function loadXMLDoc(url,readyStateFunction,async)
if(readyStateFunction) req.onreadystatechange = readyStateFunction;
req.open("GET", url, async);
req.send();
}
else {
alert('Cannot create XMLHTTP instance');
return false;
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment