modules/admin-full: xhr fixes
[project/luci.git] / modules / admin-full / luasrc / view / admin_network / iface_status.htm
index 34e3ddd..11590e1 100644 (file)
@@ -2,7 +2,7 @@
 
 <script type="text/javascript"><![CDATA[
        var iwxhr = new XHR();
-       (function() {
+       var update_status = function() {
                iwxhr.get('<%=luci.dispatcher.build_url("admin", "network", "iface_status", self.network)%>', null,
                        function(x, ifc)
                        {
                                        else if (d)
                                                d.innerHTML = '<%:Interface not present or not connected yet.%>';
                                }
+
+                               window.setTimeout(update_status, 5000);
                        }
                )
+       };
 
-               window.setTimeout(arguments.callee, 5000);
-       })();
+       update_status();
 ]]></script>
 
 <table>