This repository has been archived by the owner on Mar 9, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
grade_search.html
44 lines (43 loc) · 2 KB
/
grade_search.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
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="favicon.ico"
type="image/x-icon">
<link rel="stylesheet" href="css/bootstrap.min.css">
<title>Class Search</title>
<script>
function checkForm() {
let x = document.forms["search_form"]["search_CWID"].value;
let re = new RegExp('[0-9]{9}');
if (!x.match(re)) {
alert("Error invalid input! Please try again.");
document.forms["search_form"].reset();
return false;
}
}
</script>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<a class="navbar-brand" href="#">University Database</a>
<ul class="nav navbar-nav">
<li class="nav-item"><a class="nav-link" href="index.html">Home</a></li>
<li class="nav-item"><a class="nav-link" href="class_search.html">Search Classes</a></li>
<li class="nav-item active"><a class="nav-link" href="grade_search.html">Search Grades</a></li>
<li class="nav-item"><a class="nav-link" href="professor_search.html">Check Faculty Classes</a></li>
<li class="nav-item"><a class="nav-link" href="count_grades.html">Check Course Grades</a></li>
</ul>
</nav>
<div class="container">
<form name="search_form" action="student_grades.php" method="POST"
onsubmit="return checkForm()">
<div class="form-group">
<label for="CWID">Student CWID</label>
<input type="text" name="search_CWID"
class="form-control" id="CWID" placeholder="e.g. 123456789"/>
</div>
<button type="submit" class="btn btn-primary">Search</button>
</form>
</div>
</body>
</html>