Вот рабочая версия:
function refreshPage()
{
res = httpGet("status.php");
if (res)
{
parser = new DOMParser();
doc = parser.parseFromString(res, "text/html");
if (doc)
{
ids = ["timestamp","station","ap"];
while (id = ids.pop())
{
document.getElementById(id).innerHTML = doc.getElementById(id).innerHTML;
}
}
}
setTimeout(refreshPage,60000);
return true;
|