-
Notifications
You must be signed in to change notification settings - Fork 1
/
track.html
179 lines (166 loc) · 7.53 KB
/
track.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
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
<!doctype html>
<html lang="en">
<head>
<title>JHYJCakes</title>
<meta charset="utf-8">
<link rel="stylesheet" href="JHYJCSS.css">
<style>
#desc {
margin-top: 30px;
margin-bottom: 50px;
text-align:center;
font-size: 200%;
color: #683e06;
border-bottom: 3px solid #683e06;
}
#track {
border-bottom: 2px solid #683e06;
}
legend {
margin: auto;
text-align: center;
font-size: 130%;
color:#683e06;
}
fieldset {
border: 2px solid #683e06;
text-align:center;
margin-top: 100px;
}
fieldset table {
margin: auto;
padding: 50px 50px;
}
fieldset td {
padding: 10px 10px;
}
input[type="text"] {
width: 250px;
height: 30px;
border: 2px solid #683e06;
}
input[type="submit"] {
width: 150px;
height: 30px;
font-size: 70%;
}
fieldset label {
font-size: 110%;
color:#683e06;
}
.mid {
height: 600px;
}
input[type="text"] {
border-radius: 5px;
font-size: 80%;
}
input[type="submit"] {
border-radius: 5px;
}
#btn:hover {
opacity: 0.7;
}
</style>
</head>
<body>
<script>
function validate() {
var input = document.getElementById("orderID").value;
var regexp = /^[0-9]{1,5}$/;
if(input.length > 0) {
if(regexp.test(input) == false) {
document.getElementById("tracktable").rows[0].cells[2].innerHTML = "<b>Please Enter Only Numbers!</b>";
document.getElementById("tracktable").style.color = "#e0150e";
document.getElementById("orderID").style.border = "2px solid #e0150e";
if(document.getElementById("orderID").value.length > 5) {
document.getElementById("tracktable").rows[0].cells[2].innerHTML = "<b>Please Enter Maximum 5 Characters!</b>";
}
document.getElementById("trackbtn").innerHTML = "<input type=\"submit\" value=\"Track Order Now!\" style=\"color:#683e06; border: 2px solid #e0150e;\" disabled>";
document.getElementById("disable").innerHTML = "<b>Cannot Track. Errors not Resolved</b>";
return false;
} else {
document.getElementById("tracktable").rows[0].cells[2].innerHTML = "<b>OK!</b>";
document.getElementById("tracktable").style.color = "green";
document.getElementById("orderID").style.border = "2px solid green";
document.getElementById("trackbtn").innerHTML = "<input type=\"submit\" value=\"Track Order Now!\" style=\"color:#683e06; border: 2px solid green;\">";
document.getElementById("disable").innerHTML = "<b>Track OK!</b>";
return true;
}
} else {
document.getElementById("tracktable").rows[0].cells[2].innerHTML = "";
document.getElementById("orderID").style.border = "2px solid #683e06";
document.getElementById("trackbtn").innerHTML = "<input type=\"submit\" value=\"Track Order Now!\" style=\"color:#683e06;\">";
document.getElementById("disable").innerHTML = "";
}
}
</script>
<div class="wrapper">
<div class="top">
<header>
<div id="navigation">
<a href="index.html">
<img src="logo2.png" id="logo" alt="Home" style="width:300px;height:150px;border:0;">
</a>
<div class="tablenav">
<table align="right" id="navbar">
<tr>
<td colspan="2"></td>
<td align="right"><a href="cart.php" id="cart"><img src="cart.png" alt="Cart" style="width: 50px; height: 50px; border:0;"></a></td>
</tr>
<tr>
<td><div class="dropmenu">
<b>MENU</b>
<div class="dropcontent">
<b><a href="classic.php">CLASSIC</a></b>
<b><a href="custom.php">CUSTOM</a></b>
</div>
</div></td>
<td><b><a href="track.html" id="track">TRACK ORDER</a></b></td>
<td><b><a href="about.html">ABOUT US</a></b></td>
</tr>
</table>
</div>
</div>
</header>
</div>
<div class="mid">
<div id="desc">
<b><p>TRACK YOUR ORDER</p></b>
</div>
<div id="tracker">
<form action="trackorder.php" method="post">
<fieldset>
<legend><b>TRACK</b></legend>
<table id="tracktable">
<tr>
<td><label for="track">Your Order Number: </label></td>
<td><input type="text" name="orderID" id="orderID" oninput="validate()" required></td>
<td style="font-size: 80%;"></td>
</tr>
<tr>
<td></td>
<td align="right" id="trackbtn"><input type="submit" value="Track Order Now!" id="btn" style="color:#683e06;"></td>
<td id="disable" style="font-size: 80%;"></td>
</tr>
</table>
</fieldset>
</form>
</div>
</div>
</div>
<div class="bot">
<footer>
<hr>
<br>
<div id="tm">
<small><i><b>Copyright © 2019 JHYJCakes</b></i></small>
</div>
<div id="links"><b>
<a href="about.html#left">CONTACT US</a>
<a href=""></a>
</b></div>
</footer>
</div>
</body>
</html>