This commit is contained in:
Gnieark 2016-05-27 22:43:39 +02:00
parent 367834b29e
commit 5c80710f8e

View File

@ -133,11 +133,12 @@ function play(player){
alert ('la reponse du bot doit etre un digit compris entre 0 et 7, correspondant à la colonne. Voici sa réponse' + response); alert ('la reponse du bot doit etre un digit compris entre 0 et 7, correspondant à la colonne. Voici sa réponse' + response);
} }
}else{ }else{
alert (xhr.status); alert (xhr.status);
die; die;
} }
}}; }};
xhr.open("POST", document.getElementById('player' + player + 'URL'), true); xhr.open("POST", document.getElementById('player' + player + 'URL').value, true);
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
xhr.send('game=connectFour&match_id=666-' + player + '&you=' + symbol + '&grid=' + JSON.stringify(grid) ); xhr.send('game=connectFour&match_id=666-' + player + '&you=' + symbol + '&grid=' + JSON.stringify(grid) );