@@ -81,6 +81,16 @@
document.getElementsByClassName("btn").style.display = "none"
}
+ function addToQueue(){
+ var xhr = new XMLHttpRequest();
+ xhr.open('POST', 'http://82.165.180.114/Scripted/WEB/index.php?action=addToQueue', true);
+ xhr.responseType = 'text';
+ xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
+ xhr.onload = function () {
+ };
+ xhr.send(null);
+ }
+
function checkIsReady() {
var xhr = new XMLHttpRequest();
xhr.open('POST', 'http://82.165.180.114/Scripted/WEB/index.php?action=waiting', true);
@@ -93,8 +103,10 @@
};
xhr.send(null);
}
+
function waiting(){
displayWaiting();
+ addToQueue();
var countdownTimer = setInterval('checkIsReady()', 1000);
}