Last change
on this file since 9217 was
9217,
checked in by uli, 12 years ago
|
Merge changes from uli-async-update back into trunk.
|
File size:
496 bytes
|
Line | |
---|
1 | |
---|
2 | var loadbar_interval = null; |
---|
3 | $(document).ready( |
---|
4 | function update() { |
---|
5 | $.getJSON( |
---|
6 | $("#status_url").attr("value"), |
---|
7 | {}, |
---|
8 | function(data) { |
---|
9 | $('input[name="reload"]').remove(); |
---|
10 | clearInterval(loadbar_interval); |
---|
11 | $("#loadbar").html(data.html); |
---|
12 | if (data.reload == true) { |
---|
13 | if ($('input[name="download"]').attr("value") == null) { |
---|
14 | location.reload(); |
---|
15 | } |
---|
16 | } |
---|
17 | if (data.interval != 0) { |
---|
18 | loadbar_interval = setInterval(update, data.interval); |
---|
19 | } |
---|
20 | } |
---|
21 | ) |
---|
22 | } |
---|
23 | ) |
---|
Note: See
TracBrowser for help on using the repository browser.