-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathswap.html
142 lines (137 loc) · 5.23 KB
/
swap.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1" charset="UTF-8">
<link rel="stylesheet" type="text/css" href="css/timetabling.css">
<title>swap class</title>
<style>
table, th, td{
border-width:1px solid black;
border-collapse: collapse;
}
/*
.popup {
display: none; /* Hidden by default */ /*
position: fixed;
z-index: 1;
padding-top: 100px;
left: 0;
top: 0;
width: 100%;
height: 100%;
overflow: auto; /* Enable scroll */ /*
background-color: rgb(0,0,0);
background-color: rgba(0,0,0,0.4);
}
.popup-content {
background-color: #fefefe;
margin: auto;
padding: 20px;
border: 1px solid #888;
width: 80%;
}
.close {
color: #aaaaaa;
float: right;
font-size: 28px;
font-weight: bold;
}
.close:hover,
.close:focus {
color: #000;
text-decoration: none;
cursor: pointer;
}
*/
</style>
</head>
<body>
<div id="main">
<div id="header">
<div id="widgetBar">
<div class="logo">
<img align="left" src="logo.jpg" alt="logo" width="300" height="100">
</div>
<div class="button">
<button class="btn login" id="logout" onclick="javascript:location.href='index.html'">Logout</button>
<!--<script src="logout.js"></script>-->
</div>
<div class="button">
<button class="btn login" id="aboutUs" onclick="javascript:location.href='aboutUs.html'">About us</button>
</div>
<div class="button">
<button class="btn login" id="My Timetable" onclick="javascript:location.href='myTimetable.html'">My timetable</button>
</div>
</div>
<h1>Swapping Platform</h1>
<label for="st_name"><b>Student Name :</b></label><input type="text" id="st_name" name="st_name">
<label for="st_no"><b>Student Number :</b></label><input type="text" id="st_no" name="st_no">
<label for="st_pg"><b>Student Program :</b></label><input type="text" id="st_pg" name="st_pg">
<b>Course must attend :</b><br/>ENG<br/>CHIN<br/>MATH<br/>OOP
<p><b>Write down the number 1 (highest perferred) - 3 (lowest perferred)</b></p>
<table align="center" style="width:80%">
<tr>
<td>ENG</td> <td>Monday</td> <td>0830-1130</td> <td><input width="10px" type="int" id="eng1" name="eng1"></td>
</tr>
<tr>
<td></td> <td>Wednesday</td> <td>1130-1430</td> <td><input width="10px" type="int" id="eng2" name="eng2"></td>
</tr>
<tr>
<td></td> <td>Thursday</td> <td>1330-1630</td> <td><input width="10px" type="int" id="eng3" name="eng3"></td>
</tr>
</table>
<form action="myTimetable.html">
<input type="submit" value="submit">
</form>
<div id="footer">
<hr>
<p id="footerText">Group 18 The time tabling system</p>
</div>
</div>
</div>
<!--
<p align="right"><button onclick="submit()">submit</button>
<button onclick="restart()">cancel</button> </p>
-->
<!---Popup window--->
<div id="popup" class="popup">
<div class="popup-content">
<span class="close">×</span>
<p>Submit Successful!</p>
</div>
</div>
<script>
/*---submit(){
if(document.getElementById("st_name").value =="" || document.getElementById("st_no").value == "" || document.getElementById("st_pg").value == ""
|| document.getElementById("eng1").value == "" || document.getElementById("eng2").value == "" || document.getElementById("eng3").value == ""){
alert("You didn't finish the swapping!");
return false;
}else if(document.getElementById("eng1").value >3 || document.getElementById("eng2").value >3 || document.getElementById("eng3").value >3){
alert("You input invaild input!");
return false;
}else if(document.getElementById("eng1").value == document.getElementById("eng2").value || document.getElementById("eng1").value == document.getElementById("eng3").value
|| document.getElementById("eng2").value == document.getElementById("eng3").value){
alert("You input same input!");
return false;
}else{
var popup = document.getElementById("popup");
var btn = document.getElementById("myBtn");
var span = document.getElementsByClassName("close")[0];
btn.onclick = function() {
popup.style.display = "block";
}
span.onclick = function() {
popup.style.display = "none";
}
window.onclick = function(event) {
if (event.target == popup) {
popup.style.display = "none";
}
}
return true;
}
}---*/
</script>
</body>
</html>