From f6133e5d7c65c913cd97ed523bd1846bc0b5c435 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?No=C3=A9=20Garnier?= Date: Mon, 16 Jan 2023 12:36:05 +0100 Subject: [PATCH] test --- View/src/JS/dashboard.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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);