diff --git a/View/src/JS/dashboard.js b/View/src/JS/dashboard.js index 887cadfc..0dcd4770 100644 --- a/View/src/JS/dashboard.js +++ b/View/src/JS/dashboard.js @@ -3,10 +3,11 @@ 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'); - var playersPseudo = xhr.onload = function () { + xhr.onload = function () { console.log(xhr.responseText); - return JSON.parse(xhr.responseText); + JSON.parse(xhr.responseText); } + playersPseudo = xhr.responseText console.log(playersPseudo); xhr.send(null);