diff --git a/View/src/JS/dashboard.js b/View/src/JS/dashboard.js index e7911a0a..f8f70a95 100644 --- a/View/src/JS/dashboard.js +++ b/View/src/JS/dashboard.js @@ -1,13 +1,13 @@ function dashboard () { + let playersPseudo; var xhr = new XMLHttpRequest(); xhr.open('POST', 'http://82.165.180.114/Scripted/index.php?action=getPlayersPseudo', true); xhr.responseType = 'text'; xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); xhr.onload = function () { console.log(xhr.responseText); - // JSON.parse(xhr.responseText); + playersPseudo = JSON.parse(xhr.responseText); } - playersPseudo = xhr.responseText console.log(playersPseudo); xhr.send(null);