pagination

This commit is contained in:
Gnieark 2016-06-12 21:29:44 +02:00
parent b280132d52
commit 74f0c1f060

View File

@ -12,6 +12,11 @@ function Ajx(){
}
return request;
}
function addLog(message){
var p=createElem('p',{});
p.innerHTML=message;
document.getElementById('logs').appendChild(p);
}
function createElem(type,attributes){
var elem=document.createElement(type);
for (var i in attributes)
@ -58,11 +63,11 @@ function connectFour(bot1,bot2,xd_check, gameId, newGame){
try{
var reponse = JSON.parse(xhr.responseText);
}catch(e){
document.getElementById('logs').innerHTML += 'erreur' +xhr.responseText;
addLog('erreur' +xhr.responseText);
return;
}
//log
document.getElementById('logs').innerHTML += reponse['log'] + '<br/>';
addLog(reponse['log']);
//fill the grid
if( reponse['strikeX'] > -1){