1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
| function doRequest(url, method) {
var req = null;
if (window.ActiveXObject) {
// IE
try { req = new ActiveXObject("Msxml2.XMLHTTP"); }
catch(ex) {
// Try with older one
try { req = new ActiveXObject("Microsoft.XMLHTTP"); }
catch(ex) { req = null; }
}
} else {
// Mozilla
try { req = new XMLHttpRequest(); }
catch(ex) { req = null; }
}
try{
req.open(method, url, false);
}
catch(e){
alert("fichier introuvable")
};
var statut = req.status;
return statut;
}
function verifGeneratedFile() {
var url = "http://localhost:9080/ImpressionsLocalesNSI/CPREFO129611133194007446.pdf";
alert("url : " + url);
var ret = doRequest(url, "POST", null, "text/xml");
alert("ret : " + ret);
} |
Partager