The function at the top of the Home page is a simple calculator
that displays a new alert window with the result of multiplying the
two user entered numbers in the input fields.
Module 3: If or Switch statement from Chapter 3
The second function on the page, "Does vinyl sound better?",
has two radio buttons that the user can select from. The function uses
'if/else if' control structures to determine which of the two possible
outputs to display on the webpage, based on which radio button is selected,
after the "Submit" button is clicked which triggers the event listener
in the JavaScript.
The exception handling assignment is located on the Contact page. Within
the "validateRequired" function, there is a try/catch block of code that will
display an error message if the required fields in the form are not all filled out.
Module 6: Form Validation from Chapter 6
Within the code on the Contact page, there is a very long bit of form
validation code. The function evaluates all of the required fields within the
form, and notifies the user of any errors by updating the erroneous fields
in red.
Module 8: Form from Chapter 8
Also on the Contact page, and within the general form validation
code, I inserted some additional code that loads the items selected in the
select box into an array called "sources" using a function called "addSource"
that is triggered "on change" by the event listener. Rather than creating a
second function to delete items that were removed on change, I simply deleted
the contents of the array, and added the currently selected items.
Module 7: Calculation of time elapsed from Chapter 7
The "Time Elapsed" assignment is located at the top of the
Hardware page. The function "elapsed" uses universal time codes (UTC)
to calculate the time elapsed from a user entered date. By comparing today's
date with the date entered, it sequentially concatenates a variable called
"elapsedCounter" with the days, hours, minutes, and seconds of time elapsed
and displays the output on the page.
This assignment is located on the DAW's page. It uses jQuery code (which,
for the record, is my favorite thing learned from this class) to "unhide" the
hidden audio tracks when the user clicks on the legend header "Click here
to hear some of my own creations". I loved how clean jQuery was to code in!
Incomplete
Module 5: Image Gallery
To save you a little time in searching, I didn't complete the image gallery.
I attempted the assignment, but the code was not functioning as desired due to
my previously coded CSS. As a result, I abandoned the project due to the estimated
amount of CSS rework that would have been required to actualize the gallery.