Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 17 additions & 16 deletions case1/mpl_links_txt.html → case1/mpl_links.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,28 @@
New Perspectives on HTML5, CSS3, and JavaScript 6th Edition
Tutorial 13
Case Problem 1

Monroe Public Library Government Links
Author:
Date:
Author: Lane and Ruiz
Date: 4/10/19

Filename: mpl_links.html
-->

<title>Monroe Public Library List of Government Sites</title>
<meta charset="utf-8" />
<link href="mpl_base.css" rel="stylesheet" />
<link href="mpl_layout.css" rel="stylesheet" />
<script src= "mpl_links.js" async> </script>
</head>

<body>
<header>
<img src="mpl_logo.png" alt="Monroe Public Library" />
<img src="mpl_logo.png" alt="Monroe Public Library" />
<nav id="top">
<ul>
<input type="text" placeholder="Locate a Title" name="gSearch" id="gSearch" />
<label for="gSearch"><img src="mpl_search.png" alt="search" /></label>
<label for="gSearch"><img src="mpl_search.png" alt="search" /></label>
</ul>
</nav>
<nav id="middle">
Expand All @@ -35,11 +36,11 @@
<li><a href="#">Events</a></li>
<li><a href="#">Services</a></li>
<li><a href="#">Collections</a></li>
<li><a href="#">Support</a></li>
<li><a href="#">Support</a></li>
</ul>
</nav>
</nav>
</header>

<section>
<nav id="left">
<p>Monroe Public Library<br />
Expand All @@ -50,7 +51,7 @@
<ul>
<li class="newgroup"><a href="#">Books</a></li>
<li><a href="#">Videos</a></li>
<li><a href="#">Music</a></li>
<li><a href="#">Music</a></li>
<li><a href="#">eMedia</a></li>
<li><a href="#">Magazines</a></li>
<li><a href="#">Local History</a></li>
Expand All @@ -69,10 +70,10 @@
<li><a href="#">Computers &amp; Internet</a></li>
<li><a href="#">Community Info</a></li>
<li class="newgroup"><a href="#">Hours of Operation</a></li>
<li><a href="#">Directions</a></li>
</ul>
<li><a href="#">Directions</a></li>
</ul>
</nav>

<article>
<form id="govLinks" name="govLinks">
<h1>Government Sites on the Web</h1>
Expand Down Expand Up @@ -182,11 +183,11 @@ <h1>Government Sites on the Web</h1>
</td>
</tr>
</table>
</form>
</article>
</form>
</article>

</section>

<footer>
<p>Monroe Public Library &copy; 2018 All Rights Reserved</p>
</footer>
Expand Down
24 changes: 24 additions & 0 deletions case1/mpl_links.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
"use strict";

/*
New Perspectives on HTML5, CSS3, and JavaScript 6th Edition
Tutorial 13
Case Problem 1

Author: Denise Kruschev
Date: 2018-03-01

Filename: mpl_links.js

*/


window.addEventListener("load", function() {
var allSelect = document.querySelectorAll("form#govLinks select");

for (var i = 0; i < allSelect.length; i++) {
allSelect[i].onchange = function(e) {
location.href = e.target.value;
}
}
});
15 changes: 0 additions & 15 deletions case1/mpl_links_txt.js

This file was deleted.

97 changes: 49 additions & 48 deletions case2/dl_expense_txt.html → case2/dl_expense.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,19 @@
New Perspectives on HTML5, CSS3, and JavaScript 6th Edition
Tutorial 13
Case Problem 2

Travel Expense Report
Author:
Date:
Author: Lane and Ruiz
Date: 4/10/19

Filename: dl_expense.html
-->

<title>DeLong Enterprises Expense Report</title>
<meta charset="utf-8" />
<link href="dl_base.css" rel="stylesheet" />
<link href="dl_layout.css" rel="stylesheet" />
<script src="dl_expense.js" async> </script>


</head>
Expand All @@ -33,13 +34,13 @@
<li><a href="#">Insurance</a></li>
<li><a href="#">Accounts</a></li>
</ul>
</nav>
<img src="dl_logo.png" alt="DeLong Enterprises" id="logoImg" />
</nav>
<img src="dl_logo.png" alt="DeLong Enterprises" id="logoImg" />
</header>

<section>
<form name="expReport" id="expReport" method="post" action="dl_valid.html">

<table id="travelSummary">
<tr>
<th>Trip Summary<span>*</span></th>
Expand All @@ -50,7 +51,7 @@
</td>
</tr>
</table>

<aside>
<h1>Expense Report</h1>
<p>Form: 2CEXP15<br />
Expand All @@ -62,28 +63,28 @@ <h1>Expense Report</h1>
Rm. 3801<br />
Ext. 1250
</p>
</aside>
</aside>

<table id="empInfo">
<tr>
<th>Last Name<span>*</span></th>
<th>First Name<span>*</span></th>
<th>M.I.</th>
<th>Account<span>*</span></th>
<td><input type="text" name="accID" id="accID" placeholder="ACTnnnnnn" required /></td>
<td><input type="text" name="accID" pattern="ACT\d{6}" id="accID" placeholder="ACTnnnnnn" required /></td>
</tr>
<tr>
<td><input type="text" name="lname" id="lname" required /></td>
<td><input type="text" name="fname" id="fname" required /></td>
<td><input type="text" name="init" id="init" required /></td>
<th>Department<span>*</span></th>
<td><input type="text" name="deptID" id="deptID" required placeholder="DEPTnnnnnn" /></td>
<td><input type="text" name="deptID" pattern="DEPT\d{4,6}" id="deptID" required placeholder="DEPTnnnnnn" /></td>
</tr>
<tr>
<th>Social Security Number<span>*</span></th>
<td colspan="2"><input type="text" name="ssn" id="ssn" required placeholder="nnn-nn-nnnn" /></td>
<td colspan="2"><input type="text" name="ssn" pattern="(\d{3})(-\d{2})(-\d{4})" id="ssn" required placeholder="nnn-nn-nnnn" /></td>
<th>Project<span>*</span></th>
<td><input type="text" name="projID" id="projID" required placeholder="PROJ-xx-ddd" /></td>
<td><input type="text" name="projID" pattern="PROJ(-[a-z]{2})(-\d{3})" id="projID" required placeholder="PROJ-xx-ddd" /></td>
</tr>
</table>

Expand Down Expand Up @@ -118,16 +119,16 @@ <h1>Expense Report</h1>
</td>
<td>
<input type="text" name="lodge0" id="lodg0" class="lodge date0 sum" />
</td>
</td>
<td>
<input type="text" name="meal0" id="meal0" class="meal date0 sum" />
</td>
</td>
<td>
<input type="text" name="other0" id="other0" class="other date0 sum" />
</td>
</td>
<td>
<input type="text" name="subtotal0" id="subtotal0" class="subtotal" readonly />
</td>
</td>
</tr>
<tr>
<td>
Expand All @@ -138,17 +139,17 @@ <h1>Expense Report</h1>
</td>
<td>
<input type="text" name="lodge1" id="lodg1" class="lodge date1 sum" />
</td>
</td>
<td>
<input type="text" name="meal1" id="meal1" class="meal date1 sum" />
</td>
</td>
<td>
<input type="text" name="other1" id="other1" class="other date1 sum" />
</td>
</td>
<td>
<input type="text" name="subtotal1" id="subtotal1" class="subtotal" readonly />
</td>
</tr>
</td>
</tr>
<tr>
<td>
<input type="date" name="tDate2" id="tDate2" class="tDate" />
Expand All @@ -158,17 +159,17 @@ <h1>Expense Report</h1>
</td>
<td>
<input type="text" name="lodge2" id="lodg2" class="lodge date2 sum" />
</td>
</td>
<td>
<input type="text" name="meal2" id="meal2" class="meal date2 sum" />
</td>
</td>
<td>
<input type="text" name="other2" id="other2" class="other date2 sum" />
</td>
</td>
<td>
<input type="text" name="subtotal2" id="subtotal2" class="subtotal" readonly />
</td>
</tr>
</td>
</tr>
<tr>
<td>
<input type="date" name="tDate3" id="tDate3" class="tDate" />
Expand All @@ -178,17 +179,17 @@ <h1>Expense Report</h1>
</td>
<td>
<input type="text" name="lodge3" id="lodg3" class="lodge date3 sum" />
</td>
</td>
<td>
<input type="text" name="meal3" id="meal3" class="meal date3 sum" />
</td>
</td>
<td>
<input type="text" name="other3" id="other3" class="other date3 sum" />
</td>
</td>
<td>
<input type="text" name="subtotal3" id="subtotal3" class="subtotal" readonly />
</td>
</tr>
</td>
</tr>
<tr>
<td>
<input type="date" name="tDate4" id="tDate4" class="tDate" />
Expand All @@ -198,16 +199,16 @@ <h1>Expense Report</h1>
</td>
<td>
<input type="text" name="lodge4" id="lodg4" class="lodge date4 sum" />
</td>
</td>
<td>
<input type="text" name="meal4" id="meal4" class="meal date4 sum" />
</td>
</td>
<td>
<input type="text" name="other4" id="other4" class="other date4 sum" />
</td>
</td>
<td>
<input type="text" name="subtotal4" id="subtotal4" class="subtotal" readonly />
</td>
</td>
</tr>
<tr>
<td>
Expand All @@ -218,24 +219,24 @@ <h1>Expense Report</h1>
</td>
<td>
<input type="text" name="lodge5" id="lodg5" class="lodge date5 sum" />
</td>
</td>
<td>
<input type="text" name="meal5" id="meal5" class="meal date5 sum" />
</td>
</td>
<td>
<input type="text" name="other5" id="other5" class="other date5 sum" />
</td>
</td>
<td>
<input type="text" name="subtotal5" id="subtotal5" class="subtotal" readonly />
</td>
</tr>
</td>
</tr>
</tbody>
</table>
<input id="submitButton" type="submit" value="Submit Report" />
</form>
</form>

</section>

<footer>
<nav class="vertical">
<ul>
Expand All @@ -248,9 +249,9 @@ <h1>Expense Report</h1>
<li><a href="#">Team Contacts</a></li>
<li><a href="#">Reimbursements</a></li>
<li><a href="#">Grievances</a></li>
<li><a href="#">Staff Directory</a></li>
<li><a href="#">Staff Directory</a></li>
</ul>
</nav>
</nav>
<p>DeLong Enterprises &copy; 2018 All Rights Reserved</p>
</footer>
</body>
Expand Down
Loading