From: Jo-Philipp Wich Date: Sun, 25 Sep 2011 20:54:24 +0000 (+0000) Subject: applications/luci-upnp: javascript fixes X-Git-Tag: 0.11.0~1701 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=4a32a5751d868309b0cf1bd47d5deb92e127caf4;p=project%2Fluci.git applications/luci-upnp: javascript fixes --- diff --git a/applications/luci-upnp/luasrc/view/upnp_status.htm b/applications/luci-upnp/luasrc/view/upnp_status.htm index dcac8b46e4..fbbcb3a717 100644 --- a/applications/luci-upnp/luasrc/view/upnp_status.htm +++ b/applications/luci-upnp/luasrc/view/upnp_status.htm @@ -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) { @@ -51,12 +53,10 @@ } } - window.setTimeout(update_status, 5000); + window.setTimeout(func, 5000); } ) - }; - - update_status(); + })(); //]]>