Create an app that provides the day of the week for any date a user enters and make it useable across all browsers. Steps: Download and unzip the Lab 7 file. In the index.html file: Enter your name and today’s date where indicated in the comment section in the document head. Add script tag to access script.js file In the script.js file: Add an onclick event handler for the addButton object. Within the event handler do the following: Use the push() method to add the value of the customerName object to the end of the customers array. Run the generateCustomerList() function to update the contents of the ordered list that appears on the web page. Change the text of the status paragraph to “customer added to the end of the queue” where customer is the value of the customerName object. Add an onclick event handler for the searchButton object. Within the event handler do the following: Use the indexOf() method to locate the index of the array item whose value equals the value of the customerName object. Add 1 to the index value and store the result in the place variable. If place is equal to 0, change the text of the status paragraph to “customer is not found in the queue” where customer is the value of the customerName object; otherwise change the text of the status paragraph to “customer found in position place of the queue” where place is the value of the place variable Add an onclick event handler for the removeButton object. Within the event handler do the following: Use the indexOf() method to locate the index of the array item whose value equals the value of the customerName object. Store the index in a variable named index. If index is not equal to –1 then (i) use the splice() method to remove one item from the customers array whose index equal the value of the index variable, (ii) change the text of the status paragraph to “customer removed from the queue”, and (iii) call the generateCustomerList() function to recreate the ordered list of customer names. Otherwise, change the text of the status paragraph to “customer is not found in the queue”. Add an onclick event handler for the topButton object. Within the event handler do the following: Apply the shift() method to remove the first item from the customers array, storing the value returned by the shift() method in the topCustomer variable. Change the text of the status paragraph to “Top customer from the queue” where Top Customer is the value of the topCustomer variable. Call the generateCustomerList() function. Execute the webpage by completing following actions: Add Michael One to the customer list. Should show up as 26th position Search for Gene Bearden. Verify he is the 21st entry Remove John Hilton from the list. Verify the number of customers is now 25 Remove top customer from the list Search for Peter Blake. Verify the name is not found. Take a screen capture after completing above steps. Submit screen capture, index.html, and script.js files via Blackboard.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question
Create an app that provides the day of the week for any date a user enters and make it useable across all browsers. Steps: Download and unzip the Lab 7 file. In the index.html file: Enter your name and today’s date where indicated in the comment section in the document head. Add script tag to access script.js file In the script.js file: Add an onclick event handler for the addButton object. Within the event handler do the following: Use the push() method to add the value of the customerName object to the end of the customers array. Run the generateCustomerList() function to update the contents of the ordered list that appears on the web page. Change the text of the status paragraph to “customer added to the end of the queue” where customer is the value of the customerName object. Add an onclick event handler for the searchButton object. Within the event handler do the following: Use the indexOf() method to locate the index of the array item whose value equals the value of the customerName object. Add 1 to the index value and store the result in the place variable. If place is equal to 0, change the text of the status paragraph to “customer is not found in the queue” where customer is the value of the customerName object; otherwise change the text of the status paragraph to “customer found in position place of the queue” where place is the value of the place variable Add an onclick event handler for the removeButton object. Within the event handler do the following: Use the indexOf() method to locate the index of the array item whose value equals the value of the customerName object. Store the index in a variable named index. If index is not equal to –1 then (i) use the splice() method to remove one item from the customers array whose index equal the value of the index variable, (ii) change the text of the status paragraph to “customer removed from the queue”, and (iii) call the generateCustomerList() function to recreate the ordered list of customer names. Otherwise, change the text of the status paragraph to “customer is not found in the queue”. Add an onclick event handler for the topButton object. Within the event handler do the following: Apply the shift() method to remove the first item from the customers array, storing the value returned by the shift() method in the topCustomer variable. Change the text of the status paragraph to “Top customer from the queue” where Top Customer is the value of the topCustomer variable. Call the generateCustomerList() function. Execute the webpage by completing following actions: Add Michael One to the customer list. Should show up as 26th position Search for Gene Bearden. Verify he is the 21st entry Remove John Hilton from the list. Verify the number of customers is now 25 Remove top customer from the list Search for Peter Blake. Verify the name is not found. Take a screen capture after completing above steps. Submit screen capture, index.html, and script.js files via Blackboard.
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 2 images

Blurred answer
Knowledge Booster
Form and its Elements
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-engineering and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY