trying to relocate UA on success.

This commit is contained in:
Stefan Midjich 2016-04-20 18:26:40 +02:00
parent 35a49c57ae
commit 2c58ddf3a9

View file

@ -10,7 +10,8 @@ var debug = true;
function do_success() { function do_success() {
console.log('success: '+window.location); console.log('success: '+window.location);
// Do something like refresh the window or go to another URL. // Do something like refresh the window or go to another URL.
location.reload(); window.location = window.href;
location.reload(true);
} }
// Show an error to the user // Show an error to the user
@ -62,6 +63,12 @@ function poll_jobs(data) {
clearTimeout(timer); clearTimeout(timer);
return; return;
} }
if(job_result.is_failed) {
console.log('Job failed: ', job_result.id);
reject(job_result);
clearTimeout(timer);
return;
}); });
ajaxReq.fail(function(XMLHttpRequest, textStatus, errorThrown) { ajaxReq.fail(function(XMLHttpRequest, textStatus, errorThrown) {