diff --git a/resources/sandbox/sandbox.js b/resources/sandbox/sandbox.js index 49c0eb3..ff53388 100644 --- a/resources/sandbox/sandbox.js +++ b/resources/sandbox/sandbox.js @@ -6,17 +6,17 @@ window.onload = function(){ const serverPath = "https://server.figytuna.com:8080/ali/hello/"; const pages = [ - "world", - "data", - "players", - "location" + "World", + "Data", + "Players", + "Location" ] //Generate HTML table - for (pagePath in pages){ + for (pagePath of pages){ //Adds new table row based on the data request const $newTableRow = $("" + "Hello " + pagePath + "" - + "" + + "" + ""); //Appends new table row to table @@ -24,9 +24,9 @@ window.onload = function(){ } //Gets Table data from server - for (pagePath in pages){ - $.get(serverPath + pagePath, function(data){ - document.getElementById("hello-" + pagePath).innerHTML = data; + for (pagePath of pages){ + $.get(serverPath + pagePath.toLowerCase(), function(data){ + document.getElementById("hello-" + pagePath.toLowerCase()).innerHTML = data; }); } }