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 34 35
| function AjaXGET(URL,id,string) {
var ciblePrint = document.getElementById(id);
if(ciblePrint.style.display == 'none'){
ciblePrint.style.display = "block";
}
ciblePrint.innerHTML = '';
//ciblePrint.innerHTML = '';
var self = this;
// Mozilla/Safari
if (window.XMLHttpRequest) {
self.xmlHttpReq = new XMLHttpRequest();
}
// IE
else if (window.ActiveXObject) {
self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
}
self.xmlHttpReq.open('POST', URL, true);
self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
self.xmlHttpReq.onreadystatechange = function() {
if (self.xmlHttpReq.readyState == 4) {
ciblePrint.innerHTML += self.xmlHttpReq.responseText;
}
};
self.xmlHttpReq.send(string);
}
function RefreshMenu(menu,idmenu){
var List = menu.split(',');
var ListCible = idmenu.split(',');
var nb = List.length - 1;
for(i=0;i<=nb;i++){
//alert(List[i]+'/'+ListCible[i]);
AjaXGET('menus/'+List[i]+'.mn.php',ListCible[i],'aj=1');
}
} |
Partager