From: Jo-Philipp Wich Date: Wed, 17 Nov 2010 15:24:13 +0000 (+0000) Subject: applications/luci-upnp: xhr fix X-Git-Tag: 0.10.0~441 X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fluci.git;a=commitdiff_plain;h=01039b7fb66c4afa065a49b0b98889c0cb51ead8 applications/luci-upnp: xhr fix --- diff --git a/applications/luci-upnp/luasrc/view/upnp_status.htm b/applications/luci-upnp/luasrc/view/upnp_status.htm index 3ef668e99..b22f1bc34 100644 --- a/applications/luci-upnp/luasrc/view/upnp_status.htm +++ b/applications/luci-upnp/luasrc/view/upnp_status.htm @@ -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) { @@ -58,11 +58,13 @@ tb.rows[0].parentNode.appendChild(tr); } } + + window.setTimeout(update_status, 5000); } ) + }; - window.setTimeout(arguments.callee, 5000); - })(); + update_status(); ]]>