Home / Expert Answers / Computer Science / hey-this-is-my-html-assignment-i-39-ve-uploaded-the-assignment-instructions-and-the-code-that-was-gi-pa877

(Solved): Hey, this is my html assignment, I've uploaded the assignment instructions and the code that was giv ...



Hey, this is my html assignment, I've uploaded the assignment instructions and the code that was given to us to work on.

c. Randall wants the countdown clock to display leading zeroes when the minsLeft or secsLeft values are between 0 and 9. The New Perspectives on HTML 5 and CSS3, 7th Edition
Tutorial 9
Case Problen 4
Countdown Clock for Ticket Ordering
Author: Biruk ??????????????

 

 

c. Randall wants the countdown clock to display leading zeroes when the minsLeft or secsLeft values are between 0 and 9. The addLeadingZero.) function has been provided for you to add these zeroes if necessary. Create a new variable named minsstring and set it equal to the value returned by the addLeadingZero() function using minsLeft as the parameter value. d. Call the addLeadingZeron function again using secsLeft as the parameter value and store the result in the secsstring variable. e. Within the element with the ID minutes, change text content to the value of the minsString variable. Within the element with the ID seconds, change the text content to the value of the secsString variable. f. Randall has supplied you with a function named checkTimer() that will check whether there is any time left to submit the order. Add a command to call this function. The function has no parameters. Explore g. Use the decrement operator to decrease the value of the timeLeft variable by 1 . Explore 9. Scroll back to the top of the file and, directly below the statement that declares the timeLeft variable, insert a command to run the countdown() function every second. Store this timed command in a variable named clockld. 10. Scroll back down the file and, directly below the countdown0 function, insert a function named stopGockO. The purpose of this function is to stop the clock once the time to submit the order has run out and to notify the user that the time has expired. The function has no parameters. Add the commands specified in Steps \( a \) and \( b \) to the function. a. Use the insertAdiacentHTMLO method to insert the following HTML code \( <\mathrm{br} /> \) (Order Expired), directly before the end of the page element with the ID TimeHead. Explore b. Use the clearintervalo method to clear the timed command stored in the clockID and stop it from continuing to run. 11. Document your code with descriptive comments. 12. Save your changes to the file and then open ph pay.html in your browser. Verify that a 15 -second countdown commences once the page is loaded and continues counting down to zero. Further verify that seconds values between 0 and 9 are displayed with leading zeroes. 13. Return to the ph_clock.js file in your editor. Change the initial value of the minsLeft and secsLef variables to 30 and 0 respectively. 14. Save your changes and reload ph_clock.html in your browser. Verify that the countdown clock now starts from 30 minutes and counts down every second to the end of the time allotted for the order. New Perspectives on HTML 5 and CSS3, 7th Edition Tutorial 9 Case Problen 4 Countdown Clock for Ticket Ordering Author: Biruk Hailu Date: Novenber 25,2072 Filenane: ph_clock.js \( * f \)


We have an Answer from Expert

View Expert Answer

Expert Answer


First
We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe