summaryrefslogtreecommitdiffhomepage
path: root/modules
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2011-09-25 20:58:19 +0000
committerJo-Philipp Wich <jow@openwrt.org>2011-09-25 20:58:19 +0000
commit630d559c2663af690bb7101ff39745e395cb5378 (patch)
tree159ca1977db537ac5d79af2efd84c0c5c48e2076 /modules
parent4a32a5751d868309b0cf1bd47d5deb92e127caf4 (diff)
modules/admin-full: more javascript fixes
Diffstat (limited to 'modules')
-rw-r--r--modules/admin-full/luasrc/view/admin_network/lease_status.htm11
-rw-r--r--modules/admin-full/luasrc/view/admin_network/wifi_status.htm11
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 e5827106b..519b63e09 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 475b88a00..76635bf70 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>