diff options
Diffstat (limited to 'modules/admin-full/luasrc/view')
-rw-r--r-- | modules/admin-full/luasrc/view/admin_network/lease_status.htm | 11 | ||||
-rw-r--r-- | modules/admin-full/luasrc/view/admin_network/wifi_status.htm | 11 |
2 files changed, 12 insertions, 10 deletions
diff --git a/modules/admin-full/luasrc/view/admin_network/lease_status.htm b/modules/admin-full/luasrc/view/admin_network/lease_status.htm index e5827106b1..519b63e098 100644 --- a/modules/admin-full/luasrc/view/admin_network/lease_status.htm +++ b/modules/admin-full/luasrc/view/admin_network/lease_status.htm @@ -1,6 +1,9 @@ <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", "dhcplease_status")%>', null, function(x, st) { @@ -44,12 +47,10 @@ } } - window.setTimeout(update_status, 5000); + window.setTimeout(func, 5000); } ) - }; - - update_status(); + })(); //]]></script> <fieldset class="cbi-section"> diff --git a/modules/admin-full/luasrc/view/admin_network/wifi_status.htm b/modules/admin-full/luasrc/view/admin_network/wifi_status.htm index 475b88a007..76635bf702 100644 --- a/modules/admin-full/luasrc/view/admin_network/wifi_status.htm +++ b/modules/admin-full/luasrc/view/admin_network/wifi_status.htm @@ -2,7 +2,10 @@ <script type="text/javascript">//<![CDATA[ var iwxhr = new XHR(); - var update_status = function() { + + (function() { + var func = arguments.callee; + iwxhr.get('<%=luci.dispatcher.build_url("admin", "network", "wireless_status", self.ifname)%>', null, function(x, iw) { @@ -61,12 +64,10 @@ ); } - window.setTimeout(update_status, 5000); + window.setTimeout(func, 5000); } ) - }; - - update_status(); + })(); //]]></script> <table> |