2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 18:59:33 +00:00
fhem-mirror/fhem/webfrontend/pgm2/console.js
rudolfkoenig 924e4b58a3 FHEMWEB console
git-svn-id: https://svn.fhem.de/fhem/trunk@1296 2b470e98-0d58-463d-a4d8-8e2adae1ed80
2012-02-26 13:36:53 +00:00

31 lines
550 B
JavaScript

var consConn;
function
consUpdate()
{
if(consConn.readyState != 4 || consConn.status != 200)
return;
var el = document.getElementById("console");
if(el)
el.innerHTML=el.innerHTML+consConn.responseText;
consConn.abort();
consFill();
}
function
consFill()
{
consConn = new XMLHttpRequest();
consConn.open("GET", document.location.pathname+"?XHR=1&inform=console", true);
consConn.onreadystatechange = consUpdate;
consConn.send(null);
}
function
consStart()
{
setTimeout("consFill()", 1000);
}
window.onload = consStart;