applications/luci-upnp: javascript fixes
authorJo-Philipp Wich <jow@openwrt.org>
Sun, 25 Sep 2011 20:54:24 +0000 (20:54 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Sun, 25 Sep 2011 20:54:24 +0000 (20:54 +0000)
applications/luci-upnp/luasrc/view/upnp_status.htm

index dcac8b46e4b577b202bee7e408806c47343c0d1d..fbbcb3a717b90a28220efcc34270a95fa800dc37 100644 (file)
@@ -13,7 +13,9 @@
        }
 
        var stxhr = new XHR();
-       var update_status = function() {
+       (function() {
+               var func = arguments.callee;
+
                stxhr.get('<%=luci.dispatcher.build_url("admin", "services", "upnp", "status")%>', null,
                        function(x, st)
                        {
                                        }
                                }
 
-                               window.setTimeout(update_status, 5000);
+                               window.setTimeout(func, 5000);
                        }
                )
-       };
-
-       update_status();
+       })();
 //]]></script>
 
 <fieldset class="cbi-section">