try to draw 1000*1000 svg grig

This commit is contained in:
Gnieark 2016-06-29 13:55:23 +02:00
parent 2a8fc385e2
commit 41467e8ab5

View File

@ -12,9 +12,9 @@ function createElemNS(type,attributes){
return elem;
}
function applyInitMessage(request){
if(request.readyState == 4){
if(request.status == 200) {
function applyInitMessage(req){
if(req.readyState == 4){
if(req.status == 200) {
alert ("ok");
}else{
@ -37,8 +37,8 @@ function tron(bot1,bot2,xd_check){
document.getElementById("fightResult").appendChild(svg);
//ask arena to send bots init messages
var request = new XMLHttpRequest(request);
request.onreadystatechange = applyInitMessage;
var request = new XMLHttpRequest();
request.onreadystatechange = applyInitMessage(request);
request.open("POST", '/tron', true);
request.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
request.send('act=initGame&bot1=' + bot1 + '&bot2=' + bot2 + '&xd_check=' + xd_check + '&fullLogs=' + document.getElementById("fullLogs").checked);