forked from schornb/vision
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
74 lines (72 loc) · 1.82 KB
/
index.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>
<head>
<link rel="stylesheet" href="custom.css">
<title>Vision</title>
</head>
<body>
<ul class="nav nav-tabs nav-justified">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="index.html"><b>Home</b></a>
</li>
<li class="nav-item">
<a class="nav-link" href="groups.html"><b>Groups</b></a>
</li>
<li class="nav-item">
<a class="nav-link" href="register.php"><b>Account Creation</b></a>
</li>
</ul>
<h1>Home</h1>
<input class="searchBar" type="text" id="myInput" onkeyup="myFunction()" placeholder="Search for a course (e.g., ECON 0110)..." title="Type in a name">
<table id="userData" class="table table-bordered table-striped">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">Name</th>
<th scope="col">Courses</th>
<th scope="col">Email</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">1</th>
<td>John Smith</td>
<td>APMA 1650, ECON 0110</td>
<td>[email protected]</td>
</tr>
<tr>
<th scope="row">2</th>
<td>Jane Doe</td>
<td>ECON 0110</td>
<td>[email protected]</td>
</tr>
<tr>
<th scope="row">3</th>
<td>Brad Pitt</td>
<td>CS 0190</td>
<td>[email protected]</td>
</tr>
</tbody>
</table>
<script>
function myFunction() {
var input, filter, table, tr, td, i, txtValue;
input = document.getElementById("myInput");
filter = input.value.toUpperCase();
table = document.getElementById("userData");
tr = table.getElementsByTagName("tr");
for (i = 0; i < tr.length; i++) {
td = tr[i].getElementsByTagName("td")[1];
if (td) {
txtValue = td.textContent || td.innerText;
if (txtValue.toUpperCase().indexOf(filter) > -1) {
tr[i].style.display = "";
} else {
tr[i].style.display = "none";
}
}
}
}
</script>
</body>
</html>