Show guest count
This commit is contained in:
parent
4622ad8d59
commit
d041600ec0
@ -17,3 +17,17 @@ function loadList(name, source) {
|
|||||||
txtFile.open("GET", list, true);
|
txtFile.open("GET", list, true);
|
||||||
txtFile.send(null);
|
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);
|
||||||
|
}
|
||||||
|
@ -49,6 +49,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="member-list" id="remote-content">Liste nicht geladen</div>
|
<div class="member-list" id="remote-content">Liste nicht geladen</div>
|
||||||
<script>loadList('registered.txt', document.getElementById('left-button'))</script>
|
<script>loadList('registered.txt', document.getElementById('left-button'))</script>
|
||||||
|
<script>loadCount()</script>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
Loading…
Reference in New Issue
Block a user