-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPaidEventsSun.html
74 lines (65 loc) · 2.48 KB
/
PaidEventsSun.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Sunday Paid Events</title>
<script src="https://cdnjs.cloudflare.com/ajax/libs/PapaParse/5.3.1/papaparse.min.js" integrity="sha512-EbdJQSugx0nVWrtyK3JdQQ/03mS3Q1UiAhRtErbwl1YL/+e2hZdlIcSURxxh7WXHTzn83sjlh2rysACoJGfb6g==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
</head>
<body>
<font size="6">
<img src="/img/ODL_LOGO.png" height="100">
<font size = "20"><b>Big Spring Camp 2024: Sunday Paid Events</b></font>
<img src="/img/BIG_EVENTS_LOGO.png" height="100" align="right">
<table style="width: 95vw; margin: auto;" class="table">
<thead>
<tr id="tableHeader">
</tr>
</thead>
<tbody id="tableBody">
</tbody>
</table>
<script>
function createDataElement(htmlTag, innerText, idParent) {
let node = document.createElement(htmlTag);
let textnode = document.createTextNode(innerText);
node.appendChild(textnode);
document.getElementById(idParent).appendChild(node);
}
function createHeaderElement(columnText) {
createDataElement("th", columnText, "tableHeader");
}
function createCellData(rowIndex, dataIndex, cellText) {
if(dataIndex === 0) {
let node = document.createElement("tr");
node.setAttribute("id", "row" + rowIndex);
document.getElementById("tableBody").appendChild(node);
createDataElement("td", cellText, "row" + rowIndex);
} else {
createDataElement("td", cellText, "row" + rowIndex);
}
}
Papa.parse('http://localhost:80/PaidEventsSun.csv', {
download: true,
complete: function(results) {
for(let i = 0; i < results.data.length; i++) {
if(i === 0) {
for(let j = 0; j < results.data[i].length; j++) {
createHeaderElement(results.data[i][j]);
}
}
if(i > 0) {
for(let j = 0; j < results.data[i].length; j++) {
createCellData(i, j, results.data[i][j]);
}
}
}
}
});
</script>
</font>
<font size="4">
Note: Please confirm event availability on the OutdoorLads website.
</font>
</body>
</html>