diff options
Diffstat (limited to 'app/templates/annotate/index.html')
| -rw-r--r-- | app/templates/annotate/index.html | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/app/templates/annotate/index.html b/app/templates/annotate/index.html index a9ce8a7..793549a 100644 --- a/app/templates/annotate/index.html +++ b/app/templates/annotate/index.html @@ -302,6 +302,14 @@ nocp.onclick = function() { xhr.withCredentials = true; xhr.setRequestHeader("Content-Type", "application/json"); xhr.send(JSON.stringify(obj)); + xhr.onreadystatechange = function() { + if (xhr.readyState == XMLHttpRequest.DONE) { + if (xhr.status === 200) + window.location.href = xhr.responseText; + } else { + console.log("Error: " + xhr.status); + } + }; }; var submit = document.getElementById("btn-submit"); |
