~johanvandegriff/games.johanv.xyz

ref: 0d07fcc471b788a38641c5094921989852a8230a games.johanv.xyz/templates/hornswiggle.html -rw-r--r-- 611 bytes
0d07fcc4Johan Vandegriff added "Dr. Hornswiggle's Trancendental Ideations Generator" 7 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
{% include 'header.html' %}

<script>
function newItem() {
    var list = document.getElementById("list");

    let xhr = new XMLHttpRequest();
    xhr.open('get', "/hornswiggle_api");
    xhr.send();

    xhr.onload = function () {
        var newItem = document.createElement("li");
        newItem.textContent = xhr.response;
        list.appendChild(newItem);
    };
}
</script>

<h1>Dr. Hornswiggle's Trancendental Ideations Generator</h1>
<input type="submit" value="Additional Ideation" class="purpleButton" onclick="newItem()">

<ul id="list">
    <li>{{ item }}</li>
</ul>

{% include 'footer.html' %}