-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathflights.html
176 lines (160 loc) · 5.39 KB
/
flights.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Flights</title>
<link rel="stylesheet" href="mystyle.css" />
<script src="flight.js"></script>
<script src="script.js"></script>
</head>
<body onload="displayDateTime()">
<header>Welcome to Travel Deals - Flights</header>
<div class="navbar">
<a href="index.html">Home</a>
<a href="stays.html">Stays</a>
<a href="flights.html">Flights</a>
<a href="cars.html">Cars</a>
<a href="cruises.html">Cruises</a>
<a href="contact.html">Contact Us</a>
<a href="cart.html">Cart</a>
<a href="myaccount.html">My Account</a>
<a href="login.html">Login</a>
<a href="registration.html">Register</a>
</div>
<div class="container">
<div class="sidebar">
<h3>Explore</h3>
<a href="stays.html">Stays</a>
<a href="flights.html">Flights</a>
<a href="cars.html">Cars</a>
<a href="cruises.html">Cruises</a>
<a href="contact.html">Contact Us</a>
<a href="cart.html">Cart</a>
<a href="myaccount.html">My Account</a>
<a href="login.html">Login</a>
<a href="registration.html">Register</a>
<!-- New section for changing font size -->
<h3>Settings</h3>
<label for="fontSize">Font Size:</label>
<input
type="number"
id="fontSize"
min="12"
max="36"
value="16"
onchange="changeFontSize()"
placeholder="Enter font size (px)"
/>
<!-- New section for changing background color -->
<label for="bgColor">Background Color:</label>
<input type="color" id="bgColor" onchange="changeBgColor()" />
</div>
<div class="main-content">
<p id="dateTime"></p>
<p id="userName"></p>
<h2>Flights</h2>
<form id="flightForm" onsubmit="validateFlightForm(); return false;">
<label>Trip Type:</label>
<div>
<span>
<span>One-way</span>
<span>
<input
type="radio"
name="tripType"
value="oneway"
onclick="toggleReturnDate(false)"
required
/>
</span>
</span>
<span>
<span>Round-trip</span>
<span>
<input
type="radio"
name="tripType"
value="roundtrip"
onclick="toggleReturnDate(true)"
required
/>
</span>
</span>
</div>
<label for="originCity">Origin City:</label>
<select id="origin">
<option value="" disabled selected>Select an origin city</option>
</select><br />
<label for="destinationCity">Destination City:</label>
<select id="destination">
<option value="" disabled selected>Select a destination city</option>
</select><br />
<label for="departureDate">Departure Date:</label>
<input
type="date"
id="departureDate"
name="departureDate"
required
/><br />
<div id="returnDateContainer" style="display: none">
<label for="returnDate">Return Date:</label><br />
<input
type="date"
id="returnDate"
name="returnDate"
style="width: 97%"
/><br />
</div>
<!-- Passenger Icon -->
<div id="passengerIcon" onclick="showPassengerForm()">
<img
src="passenger.png"
alt="Passenger Icon"
style="width: 30px; height: 30px; cursor: pointer"
/>
<span>Add Passengers</span>
</div>
<!-- Passenger Form (Initially Hidden) -->
<div id="passengerForm" style="display: none">
<label for="adults">Adults (Max 4):</label>
<input
type="number"
id="adults"
name="adults"
min="0"
max="4"
/><br />
<label for="children">Children (Max 4):</label>
<input
type="number"
id="children"
name="children"
min="0"
max="4"
/><br />
<label for="infants">Infants (Max 4):</label>
<input
type="number"
id="infants"
name="infants"
min="0"
max="4"
/><br />
</div>
<button type="submit">Search</button>
</form>
<!-- New section to display available flights -->
<div id="availableFlights" style="margin-top: 20px">
<div id="flightsContainer"></div>
</div>
</div>
</div>
<div class="footer">
Section Number: CS 6314.002<br />
Dhairya Patel (NetID: ddp230000)<br />
Prathamesh Kulkarni (NetID: pdk220001)<br />
Harsh Rashmikant Patel (NetID: hxp230001)<br />
</div>
</body>
</html>