applications/luci-upnp: xhr fix
[project/luci.git] / applications / luci-upnp / luasrc / view / upnp_status.htm
index 3ef668e..b22f1bc 100644 (file)
@@ -15,7 +15,7 @@
        }
 
        var stxhr = new XHR();
-       (function() {
+       var update_status = function() {
                stxhr.get('<%=luci.dispatcher.build_url("admin", "services", "upnp", "status")%>', null,
                        function(x, st)
                        {
                                                tb.rows[0].parentNode.appendChild(tr);
                                        }
                                }
+
+                               window.setTimeout(update_status, 5000);
                        }
                )
+       };
 
-               window.setTimeout(arguments.callee, 5000);
-       })();
+       update_status();
 ]]></script>
 
 <fieldset class="cbi-section">