-
Notifications
You must be signed in to change notification settings - Fork 3
/
result.html
49 lines (44 loc) · 1.39 KB
/
result.html
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" type="text/css" href="css/styles.css">
</head>
<body>
<div class="genDiv">
<input type="hidden" id="token" value=tokenValue />
<input type="number" id="nftQuantity" placeholder="Quantity" />
<button class="btn" onclick="generate()">Generate</button>
</div>
<div class="row">
<div class="column">
</div>
<div class="column">
</div>
<div class="column">
</div>
<div class="column">
</div>
</div>
<script>
function generate() {
const token = document.getElementById('token').value;
const nftQuantity = document.getElementById('nftQuantity').value;
var myHeaders = new Headers();
myHeaders.append("token", token);
myHeaders.append("nftq", nftQuantity);
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("/generate", requestOptions)
.then(response => response.text())
.then(result => {
console.log(result);
document.getElementsByClassName('row')[0].innerHTML = result;
})
.catch(error => console.log('error', error));
}
</script>
</body>
</html>