From e9178ecbba66582511bdfaafa9518dd18022d87c Mon Sep 17 00:00:00 2001 From: alisolarflare Date: Wed, 14 Jun 2017 23:27:45 -0700 Subject: [PATCH] javascript capturing fix --- resources/sandbox/sandbox.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/resources/sandbox/sandbox.js b/resources/sandbox/sandbox.js index ff53388..759879c 100644 --- a/resources/sandbox/sandbox.js +++ b/resources/sandbox/sandbox.js @@ -12,7 +12,7 @@ window.onload = function(){ "Location" ] //Generate HTML table - for (pagePath of pages){ + for (const pagePath of pages){ //Adds new table row based on the data request const $newTableRow = $("" + "Hello " + pagePath + "" @@ -24,8 +24,9 @@ window.onload = function(){ } //Gets Table data from server - for (pagePath of pages){ + for (const pagePath of pages){ $.get(serverPath + pagePath.toLowerCase(), function(data){ + console.log(pagePath + "|" + data); document.getElementById("hello-" + pagePath.toLowerCase()).innerHTML = data; }); }