-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhw5part2.html
More file actions
71 lines (69 loc) · 3 KB
/
hw5part2.html
File metadata and controls
71 lines (69 loc) · 3 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<!--Kristian Reyes 10/23/2020 -->
<title>CNIT 133 Homework 5</title>
<meta charset="utf-8">
<meta name="description" content="homework 5 for CCSF CNIT 133">
<meta name="keywords" content="HTML, CSS, Javascript, CCSF, Student">
<meta name="author" content="Kristian Reyes">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!--bootstrap -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js"></script>
<!--bootstrap -->
<script>
function openDestination(myForm) { //function to process dropdown selection
var myURL = myForm.navlist.options[myForm.navlist.selectedIndex].value; // variable for url of site based on selection
window.location = myURL;
}
</script>
</head>
<body>
<main class="grid">
<header class="grid-area grid-area-1">
<h2> Homework 5 - Part 2 </h2>
</header>
<nav class="grid-area grid-area-2">
<ul>
<li>
<a href="homework5.html" title="CNIT 133 - HW 5 ">
Return to CNIT 133 Homework 5 - Arrays
</a>
</li>
</ul>
</nav>
<section class="grid-area grid-area-3">
<h2> Pulldown Menu Navigation</h2>
<form>
<h3>Choose a travel site!</h3>
<select name="navlist" onChange="openDestination(this.form);">
<!-- OnChange handler -->
<option>Select one</option>
<option value="https://www.expedia.com/">Expedia</option>
<option value="https://www.travelocity.com/">Travelocity</option>
<option value="https://www.kayak.com/">Kayak</option>
</select>
</form>
<br><br>
<form>
<h3>Choose a music site!</h3>
<select name="navlist">
<option>Select one</option>
<option value="https://www.spotify.com/us/">Spotify</option>
<option value="https://bandcamp.com/">Bandcamp</option>
<option value="https://tidal.com/">Tidal</option>
</select>
<input type="button" value="Go" onClick="openDestination(this.form);"> <!-- OnClick handler -->
</form>
</section>
<footer class="grid-area grid-area-4">
<p>
© 2020 Kristian Reyes
</p>
</footer>
</main>
</body>
</html>