summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-ahcp/luasrc
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2011-09-25 20:52:26 +0000
committerJo-Philipp Wich <jow@openwrt.org>2011-09-25 20:52:26 +0000
commit5f6ea74d22c414c93e2c6615b9e2eaa61bbff4bc (patch)
treeaa1e533e997c715221741afd23e65cb3135383bc /applications/luci-ahcp/luasrc
parente3435a49e9ba289d6e43758fbcbc29804f7bbbc1 (diff)
applications/luci-ahcp: javascript fix
Diffstat (limited to 'applications/luci-ahcp/luasrc')
-rw-r--r--applications/luci-ahcp/luasrc/view/ahcp_status.htm10
1 files changed, 5 insertions, 5 deletions
diff --git a/applications/luci-ahcp/luasrc/view/ahcp_status.htm b/applications/luci-ahcp/luasrc/view/ahcp_status.htm
index bc595ce6c..f9ac7c3b0 100644
--- a/applications/luci-ahcp/luasrc/view/ahcp_status.htm
+++ b/applications/luci-ahcp/luasrc/view/ahcp_status.htm
@@ -1,6 +1,8 @@
<script type="text/javascript">//<![CDATA[
var stxhr = new XHR();
- var update_status = function() {
+ (function() {
+ var func = arguments.callee;
+
stxhr.get('<%=luci.dispatcher.build_url("admin", "network", "ahcpd", "status")%>', null,
function(x, st)
{
@@ -37,12 +39,10 @@
tx.innerHTML = String.format('The AHCP Service is running with ID %s.', st.uid);
}
- window.setTimeout(update_status, 5000);
+ window.setTimeout(func, 5000);
}
)
- };
-
- update_status();
+ })();
//]]></script>
<fieldset class="cbi-section">