|
|
@ -7,6 +7,7 @@
|
|
|
|
console.log(xhr.responseText);
|
|
|
|
console.log(xhr.responseText);
|
|
|
|
return JSON.parse(xhr.responseText);
|
|
|
|
return JSON.parse(xhr.responseText);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
console.log(playersPseudo);
|
|
|
|
xhr.send(null);
|
|
|
|
xhr.send(null);
|
|
|
|
|
|
|
|
|
|
|
|
data = [];
|
|
|
|
data = [];
|
|
|
@ -20,10 +21,11 @@
|
|
|
|
xhr.open('POST', 'http://82.165.180.114/Scripted/index.php?action=getPlayerScore&pseudo='. playersPseudo[0], true);
|
|
|
|
xhr.open('POST', 'http://82.165.180.114/Scripted/index.php?action=getPlayerScore&pseudo='. playersPseudo[0], true);
|
|
|
|
xhr.responseType = 'text';
|
|
|
|
xhr.responseType = 'text';
|
|
|
|
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
|
|
|
|
xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
|
|
|
|
var score = xhr.onload = function () {
|
|
|
|
var score = xhr.onload = function () {
|
|
|
|
console.log(xhr.responseText);
|
|
|
|
console.log(xhr.responseText);
|
|
|
|
return JSON.parse(xhr.responseText);
|
|
|
|
return JSON.parse(xhr.responseText);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
xhr.send(null);
|
|
|
|
xhr.send(null);
|
|
|
|
for (i = 0; i < score.length; i++) {
|
|
|
|
for (i = 0; i < score.length; i++) {
|
|
|
|
v1.dataPoints.push({x:i+1,y:score[i]});
|
|
|
|
v1.dataPoints.push({x:i+1,y:score[i]});
|
|
|
|