function GetXmlData(){
nocache = "&nocache=" + Math.random() * 1000000;
var request = new XMLHttpRequest();
request.onreadystatechange = function(){
if (this.readyState == 4) {
if (this.status == 200) {
if (this.responseXML != null) {
document.getElementById("orario").innerHTML= this.responseXML.getElementsByTagName('orario1')[0].childNodes[0].nodeValue;
document.getElementById("cntd_agg_automatico").inn erHTML= this.responseXML.getElementsByTagName('cntd_agg_au tomatico1')[0].childNodes[0].nodeValue;
document.getElementById("termostato").src= this.responseXML.getElementsByTagName('termostato1 ')[0].childNodes[0].nodeValue;
.............................
}
}
}
}
// send HTTP GET request with LEDs to switch on/off if any
request.open("GET", "http://................................:801/?aggiorna_WEB", true);
request.send(null);
setTimeout('GetXmlData()', 1000);
}