applications/luci-upnp: xhr fix
authorJo-Philipp Wich <jow@openwrt.org>
Wed, 17 Nov 2010 15:24:13 +0000 (15:24 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Wed, 17 Nov 2010 15:24:13 +0000 (15:24 +0000)
applications/luci-upnp/luasrc/view/upnp_status.htm

index 3ef668e9914c885b6d98c8f9224b51324d863db9..b22f1bc34de305b5b1b168419e99dda282899315 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">