-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrentalbooking.html
361 lines (304 loc) · 13.8 KB
/
rentalbooking.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
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Font -->
<link href='https://fonts.googleapis.com/css?family=Roboto+Condensed' rel='stylesheet' type='text/css'>
<meta charset="utf-8" />
<!-- Css -->
<link href="./base.css" type="text/css" rel="stylesheet">
<title>Rental Booking | AlpineKo Ski and Board</title>
</head>
<body>
<!-- First Header -->
<div id="navbar">
<a href="index.html">
<img class="navlogo" src="./images/aklogo.png" alt="logo">
</a>
<div id="innernav">
<ul>
<li><a href="lessons.html">LESSONS</a></li>
<li><a href="rentals.html">RENTALS</a></li>
<li><a href="accessories.html">TUNE UPS</a></li>
<li><a href="aboutus.html">ABOUT US</a></li>
</ul>
</div>
<ul class="login">
<li><a href="login.html">LOGIN</a></li>
</ul>
</div>
<!-- Banner -->
<div id="banner">
<div class="innerbanner">
<h1>Rental Booking</h1>
<p>Rent Snowboards/Skiis and Accessories</p>
</div>
</div>
<div id="wrapper">
<div id="bookingcontent1">
<h2>Customer Information</h2>
<form method="post" action="http://webdevfoundations.net/scripts/formdemo.asp" name="rentalForm" onsubmit="return submitValidate()">
<label for="RentalType">Rental Type: <span class="errorLabel" id="RentalTypeError">Please select a rental type.</span></label>
<select size="1" name="RentalType" id="RentalType" onblur="typeValidate();">
<option value="">Select rental type</option>
<option value="Ski">Ski</option>
<option value="Snowboard">Snowboard</option>
</select>
<label for="RentalQuality">Rental Quality: <span class="errorLabel" id="RentalQualityError">Please enter a rental quality.</span></label>
<select size="1" name="RentalQuality" id="RentalQuality" onblur="qualityValidate();">
<option value="">Select rental quality</option>
<option value="New">New</option>
<option value="Used">Used</option>
</select>
<label for="Length">Ski/Board Length (cm): <span class="errorLabel" id="Ski/BoardLengthError">Invalid length.</span></label>
<input type="text" size="6" name="Length" id="Length" onblur="lengthValidate();">
<label for="Accessories">Accessories: <span class="errorLabel" id="accessoryError">Please enter an accessory.</span></label>
<input type="text" name="Accessories" id="Accessories" onblur="accessoryValidate();">
<label for="date">Book a Date: <span class="errorLabel" id="dateError">Error</span></label>
<input type="date" name="date" id="date" required="required">
<label for="name">Name: <span class="errorLabel" id="nameError">Please enter your name.</span></label>
<input type="text" name="Name" id="name" onblur="nameValidate();">
<label for="dateOfBirth">Date of birth (mm-dd-yyyy): <span class="errorLabel" id="dateOfBirthError">Date not valid.</span></label>
<input type="text" size="10" name="dateOfBirth" id=dateOfBirth" required="required" onblur="dobValidate();">
<label for="Age">Age: <span class="errorLabel" id="ageError">Please enter an age.</span></label>
<input type="text" size="3" id="Age" name="Age" onblur="ageValidate();">
<label for="email">E-mail: <span class="errorLabel" id="emailError">Please enter a valid email.</span></label>
<input type="email" id="email" name="email" onblur="emailValidate();">
<label for="phoneNumber">Phone Number: <span class="errorLabel" id="phoneNumberError">Enter a valid phone number.</span></label>
<input type="tel" name="phoneNumber" id="phoneNumber" onblur="phoneValidate();">
<label for="paymentType">Payment Type: <span class="errorLabel" id="paymentTypeError">Select a payment type.</span></label>
<select size="1" name="paymentType" id="paymentType" onblur="paymentValidate();">
<option value="">Select payment type</option>
<option value="Visa">Visa</option>
<option value="Mastercard">Mastercard</option>
<option value="American Express">American Express</option>
</select>
<input type="submit" value="Submit" class="submit">
<input type="reset" class="reset">
</form>
</div>
<div id="bookingcontent2">
<h2>Prices</h2>
<table id="rtable1">
<tr>
<th>Rental/day</th>
<th>Price</th>
</tr>
<tr>
<td>Ski/Snowboard (new)</td>
<!--enter price-->
<td>$ 45.00</td>
</tr>
<tr>
<td>Ski/Snowboard (used)</td>
<!--enter price-->
<td>$ 35.00</td>
</tr>
<tr>
<td>Helmet</td>
<td>$ 10.00</td>
</tr>
<tr>
<td>Goggles</td>
<td>$ 8.00</td>
</tr>
<tr>
<td>Boots</td>
<td>$ 25.00</td>
</tr>
</table>
<h2>Ski/Snowboard Sizing (cm)</h2>
<table id="rtable2">
<tr>
<th>height</th>
<th>Snowboard</th>
<th>Ski</th></tr>
<tr>
<!--height of individual-->
<td>147</td>
<!--board length-->
<td>128-136</td>
<!--ski length-->
<td>130-139</td>
</tr>
<tr>
<td>158</td>
<td>139-147</td>
<td>150-159</td>
</tr>
<tr>
<td>168</td>
<td>149-157</td>
<td>160-169</td>
</tr>
<tr>
<td>173</td>
<td>154-162</td>
<td>170-179</td>
</tr>
<tr>
<td>183</td>
<td>160+</td>
<td>180-189</td>
</tr>
</table>
</div>
</div>
<div id="footer">
<div class="innerfooter">
<ul class="footercontact">
<li>Phone: 604.555.3434</li>
<li>Email: <a href="mailto:[email protected]">[email protected]</a></li>
<li>Find Us on Facebook!</li>
<li>Twitter @alpineko</li>
</ul>
<p>Copyright Lucas Chan - Delan Elliot - Derek Hirotsu - Jim Ko - Daniel Park</p>
<p>All rights reserved</p>
<p><a href="./contact.html">Contact Us</a></p>
<p><a href="Sitemap.html">Site Map</a></p>
</div>
</div>
<script type="text/javascript">
function nameValidate() {
var nameError = document.getElementById("nameError");
var name = document.rentalForm.name;
if (name.value === "") {
nameError.style.display = "inline";
return false;
}
else {
nameError.style.display = "none";
return true;
}
}
function lengthValidate() {
var lengthRegex = /[0-9]{3}/;
var length = document.rentalForm.Length;
var lengthError = document.getElementById("Ski/BoardLengthError");
if (length.value === "") {
lengthError.style.display = "inline";
return false;
} else if (length.value.match(lengthRegex) == null) {
lengthError.style.display = "inline";
return false;
}
else {
lengthError.style.display = "none";
return true;
}
}
function accessoryValidate() {
var accessoryError = document.getElementById("accessoryError");
var accessory = document.rentalForm.Accessories;
if (accessory.value === "") {
accessoryError.style.display = "inline";
return false;
}
else {
accessoryError.style.display = "none";
return true;
}
}
function phoneValidate() {
var phoneRegex = /\(?([0-9]{3})\)?([ .-]?)([0-9]{3})\2([0-9]{4})/;
var phoneNum = document.rentalForm.phoneNumber;
var phoneError = document.getElementById("phoneNumberError");
if (phoneNum.value === "") {
phoneError.style.display = "inline";
return false;
} else if (phoneNum.value.match(phoneRegex) == null) {
phoneError.style.display = "inline";
return false;
}
else {
phoneError.style.display = "none";
return true;
}
}
function dobValidate() {
var dobRegex = /(0[1-9]|1[012])[- \/.](0[1-9]|[12][0-9]|3[01])[- \/.](19|20)\d\d/;
var dob = document.rentalForm.dateOfBirth;
var dobError = document.getElementById("dateOfBirthError");
if (dob.value === "") {
dobError.style.display = "inline";
return false;
} else if (dob.value.match(dobRegex) == null) {
dobError.style.display = "inline";
return false;
} else {
dobError.style.display = "none";
return true;
}
}
function emailValidate() {
var emailRegex = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/i;
var email = document.rentalForm.email;
var emailError = document.getElementById("emailError");
if (email.value === "") {
emailError.style.display = "inline";
return false;
} else if (email.value.match(emailRegex) == null) {
emailError.style.display = "inline";
return false;
} else {
emailError.style.display = "none";
return true;
}
}
function typeValidate() {
var type = document.rentalForm.RentalType;
var typeError = document.getElementById("RentalTypeError");
if (type.value == "") {
typeError.style.display = "inline";
return false;
}
else {
typeError.style.display = "none";
return true;
}
}
function qualityValidate() {
var quality = document.rentalForm.RentalQuality;
var qualityError = document.getElementById("RentalQualityError");
if (quality.value == "") {
qualityError.style.display = "inline";
return false;
}
else {
qualityError.style.display = "none";
return true;
}
}
function ageValidate() {
var age = document.rentalForm.Age;
var ageError = document.getElementById("ageError");
if (age.value === "") {
ageError.style.display = "inline";
return false;
} else {
ageError.style.display = "none";
return true;
}
}
function paymentValidate() {
var payment = document.rentalForm.paymentType;
var paymentError = document.getElementById("paymentTypeError");
if (payment.value == "") {
paymentError.style.display = "inline";
return false;
}
else {
paymentError.style.display = "none";
return true;
}
}
function submitValidate() {
if (nameValidate() && phoneValidate() && lengthValidate() && dobValidate() && emailValidate() && typeValidate() && qualityValidate() && ageValidate() && paymentValidate()) {
return true;
}
else {
return false;
}
}
</script>
</body>
</html>