mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-07 18:18:18 +01:00
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;
|
theURL+="&sd="+ymd;
|
||||||
}
|
}
|
||||||
|
|
||||||
loadXMLDoc(theURL,null,false);
|
loadXMLDoc(theURL,alertContents,false);
|
||||||
showDP.box.innerHTML=req.responseText;
|
showDP.box.innerHTML=req.responseText;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -259,6 +259,13 @@ function loadXMLDoc(url,readyStateFunction,async)
|
|||||||
// branch for native XMLHttpRequest object
|
// branch for native XMLHttpRequest object
|
||||||
if (window.XMLHttpRequest) {
|
if (window.XMLHttpRequest) {
|
||||||
req = new XMLHttpRequest();
|
req = new XMLHttpRequest();
|
||||||
|
if (req.overrideMimeType) {
|
||||||
|
req.overrideMimeType('text/xml');
|
||||||
|
}
|
||||||
|
if (!req) {
|
||||||
|
alert('Cannot create XMLHTTP instance');
|
||||||
|
return false;
|
||||||
|
}
|
||||||
req.onreadystatechange = readyStateFunction;
|
req.onreadystatechange = readyStateFunction;
|
||||||
req.open("GET", url, async);
|
req.open("GET", url, async);
|
||||||
req.send(null);
|
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() {
|
function hideSelectBoxes() {
|
||||||
var brsVersion = parseInt(window.navigator.appVersion.charAt(0), 10);
|
var brsVersion = parseInt(window.navigator.appVersion.charAt(0), 10);
|
||||||
if (brsVersion <= 6 && window.navigator.userAgent.indexOf("MSIE") > -1) {
|
if (brsVersion <= 6 && window.navigator.userAgent.indexOf("MSIE") > -1) {
|
||||||
|
|||||||
Reference in New Issue
Block a user