JavaScript:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
function check_conference_import_spreadsheet_status(url) { var xhr = new XMLHttpRequest(); xhr.open('GET', url, true); xhr.onreadystatechange = function () { if (this.readyState != 4) return; if (this.status == 200) { var response = JSON.parse(this.responseText); if (response.status != 'in_processing') { location.reload(); } return; } } xhr.send(); } |
Jquery