diff --git a/Public/assets/festival-info.js b/Public/assets/festival-info.js index 4a8a7fa..2729246 100644 --- a/Public/assets/festival-info.js +++ b/Public/assets/festival-info.js @@ -17,3 +17,17 @@ function loadList(name, source) { txtFile.open("GET", list, true); txtFile.send(null); } + +function loadCount() { + var txtFile = new XMLHttpRequest(); + var allText = ""; + txtFile.onreadystatechange = function () { + if (txtFile.readyState === XMLHttpRequest.DONE && txtFile.status == 200) { + allText = txtFile.responseText; + } + document.getElementById("left-button").innerHTML = "Registered (" + allText + ")"; + } + var list = '/festival/api/count' + name; + txtFile.open("GET", list, true); + txtFile.send(null); +} diff --git a/Public/festival-info.html b/Public/festival-info.html index ce14c1e..0446603 100644 --- a/Public/festival-info.html +++ b/Public/festival-info.html @@ -19,7 +19,7 @@ - +