Fix: ajout vrification sur la fonction loadXMLDoc

This commit is contained in:
Regis Houssin
2007-12-16 12:46:40 +00:00
parent 2ffe5b9717
commit 689ff53bde

View File

@@ -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);
@@ -277,6 +273,10 @@ function loadXMLDoc(url,readyStateFunction,async)
req.open("GET", url, async);
req.send();
}
else {
alert('Cannot create XMLHTTP instance');
return false;
}
}
}