diff options
Diffstat (limited to 'static/longpolling.js')
-rw-r--r-- | static/longpolling.js | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/static/longpolling.js b/static/longpolling.js deleted file mode 100644 index 965c1d18d..000000000 --- a/static/longpolling.js +++ /dev/null @@ -1,25 +0,0 @@ -// Updates a div with a specified id, by polling an url, -// which should return a new div, with the same id. - -connfails=0; - -function longpoll(url, divid, cont, fail) { - $.ajax({ - 'url': url, - 'dataType': 'html', - 'success': function(data, status, jqxhr) { - $('#' + divid).replaceWith(data); - connfails=0; - cont(); - }, - 'error': function(jqxhr, msg, e) { - connfails=connfails+1; - if (connfails > 3) { - fail(); - } - else { - cont(); - } - } - }); -} |