source: trunk/spip/esqueleto-redcta/plugins/spip-listes_1_9_2/javascript/autocron.js @ 90

Last change on this file since 90 was 90, checked in by guille, 15 years ago

importacion de spip-listes-1_9_2

File size: 770 bytes
Line 
1if (window.XMLHttpRequest) { 
2    xmlHttp = new XMLHttpRequest();
3} else if (window.ActiveXObject) { 
4    xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
5}
6function callServer(url) {
7  xmlHttp.open("GET", url, true);
8  xmlHttp.onreadystatechange = updatePage;
9  xmlHttp.send(null);
10}
11function updatePage() {
12  if (xmlHttp.readyState == 4) {
13    var response = xmlHttp.responseText;
14    var fin="fin";
15    if(response.indexOf(fin) == 0){
16    document.getElementById("meleuse").innerHTML = "<p align='center'><strong>100%</strong>";
17    setTimeout("document.location.href = '?exec=spip_listes'",5000);
18    }else{
19    document.getElementById("meleuse").innerHTML = response;
20    setTimeout("callServer('?exec=autocron')",15000);
21    }
22  }
23}
24callServer("?exec=autocron");
Note: See TracBrowser for help on using the repository browser.