applications/luci-ahcp: rework status javascript to use XHR.poll()

This commit is contained in:
Jo-Philipp Wich 2011-09-26 00:26:19 +00:00
parent fa52f7f54b
commit 97f74fe766

View file

@ -1,9 +1,5 @@
<script type="text/javascript">//<![CDATA[
var stxhr = new XHR();
(function() {
var func = arguments.callee;
stxhr.get('<%=luci.dispatcher.build_url("admin", "network", "ahcpd", "status")%>', null,
XHR.poll(5, '<%=luci.dispatcher.build_url("admin", "network", "ahcpd", "status")%>', null,
function(x, st)
{
var tb = document.getElementById('ahcpd_status_table');
@ -38,11 +34,8 @@
else
tx.innerHTML = String.format('The AHCP Service is running with ID %s.', st.uid);
}
window.setTimeout(func, 5000);
}
)
})();
);
//]]></script>
<fieldset class="cbi-section">