forked from Wavyzz/dolibarr
Fix: ajout vrification sur la fonction loadXMLDoc
This commit is contained in:
@@ -145,7 +145,7 @@ function loadMonth(base,month,year,ymd)
|
||||
theURL+="&sd="+ymd;
|
||||
}
|
||||
|
||||
loadXMLDoc(theURL,null,false);
|
||||
loadXMLDoc(theURL,alertContents,false);
|
||||
showDP.box.innerHTML=req.responseText;
|
||||
}
|
||||
|
||||
@@ -259,6 +259,13 @@ function loadXMLDoc(url,readyStateFunction,async)
|
||||
// branch for native XMLHttpRequest object
|
||||
if (window.XMLHttpRequest) {
|
||||
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);
|
||||
req.send(null);
|
||||
@@ -273,6 +280,17 @@ function loadXMLDoc(url,readyStateFunction,async)
|
||||
}
|
||||
}
|
||||
|
||||
function alertContents(httpRequest)
|
||||
{
|
||||
if (httpRequest.readyState == 4) {
|
||||
if (httpRequest.status == 200) {
|
||||
alert(httpRequest.responseText);
|
||||
} else {
|
||||
alert('There was a problem with the request.');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function hideSelectBoxes() {
|
||||
var brsVersion = parseInt(window.navigator.appVersion.charAt(0), 10);
|
||||
if (brsVersion <= 6 && window.navigator.userAgent.indexOf("MSIE") > -1) {
|
||||
|
||||
Reference in New Issue
Block a user