New Perspectives on HTML5, CSS3, and JavaScript
6th Edition
ISBN: 9781305503922
Author: Patrick M. Carey
Publisher: Cengage Learning
expand_more
expand_more
format_list_bulleted
Concept explainers
Question
Chapter 9, Problem 10CP4
a)
Program Plan Intro
To declare a stopClock()function which will stop the clock once the time to submit the orderhas run out and to declare the insertAdjacentHTML()method to insert the following HTML code <br/>(OrderExpired)in file ph_clock.js.
b)
Program Plan Intro
To call a clearInterval()method to clear the timed command stored in the clockID and stop it from continuing to runin file ph_clock.js.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Event Listeners
Go to the co_credit.js file in your editor. Create an event listener for the window load event that retrieves the field values attached to the query string of the page’s URL. Add the following to the event listener’s anonymous function:
Create the orderData variable that stores the query string text from the URL. Slice the orderData text string to remove the first ? character, replace every occurrence of the + character with a blank space, and decode the URI-encoded characters.
Split the orderData variable at every occurrence of a & or = character and store the substrings in the orderFields array variable.
Write the following values from the orderFields array into the indicated fields of the order form:
orderFields[3] into the modelName field
orderFields[5] into the modelQty field
orderFields[7] into the orderCost field
orderFields[9] into the shippingType field
orderFields[13] into the shippingCost field
orderFields[15] into the subTotal field
orderFields[17]…
Imagine that an xhtml document contains the following hyperlink tag
I am Seven.
When the link text (Seven) is clicked, the servlet with the URL pattern /process is called. Rewrite the code to instead use a form that submits to the same servlet to produce the exact same response using hidden form elements for any form parameters. The form should contain a submit button with the button text Seven. The form method should be get (case sensitive answer).
Using functions right this code with javascript
Chapter 9 Solutions
New Perspectives on HTML5, CSS3, and JavaScript
Ch. 9.1 - Prob. 2QCCh. 9.1 - What is the difference between asynchronously...Ch. 9.1 - Provide the command to display an alert dialog box...Ch. 9.1 - Prob. 8QCCh. 9.2 - Prob. 6QCCh. 9 - Prob. 2RACh. 9 - Prob. 4RACh. 9 - Prob. 5RACh. 9 - Prob. 6RACh. 9 - Prob. 7RA
Ch. 9 - Prob. 8RACh. 9 - Prob. 9RACh. 9 - Prob. 10RACh. 9 - Prob. 11RACh. 9 - Prob. 1CP1Ch. 9 - Prob. 2CP1Ch. 9 - Prob. 3CP1Ch. 9 - Prob. 4CP1Ch. 9 - Prob. 5CP1Ch. 9 - Prob. 6CP1Ch. 9 - Prob. 7CP1Ch. 9 - Prob. 8CP1Ch. 9 - Prob. 9CP1Ch. 9 - Prob. 10CP1Ch. 9 - Prob. 11CP1Ch. 9 - Prob. 12CP1Ch. 9 - Prob. 13CP1Ch. 9 - Prob. 14CP1Ch. 9 - Prob. 15CP1Ch. 9 - Prob. 16CP1Ch. 9 - Prob. 1CP2Ch. 9 - Prob. 2CP2Ch. 9 - Prob. 3CP2Ch. 9 - Prob. 4CP2Ch. 9 - Prob. 5CP2Ch. 9 - Prob. 6CP2Ch. 9 - Prob. 7CP2Ch. 9 - Prob. 8CP2Ch. 9 - Prob. 9CP2Ch. 9 - Prob. 10CP2Ch. 9 - Prob. 11CP2Ch. 9 - Prob. 12CP2Ch. 9 - Prob. 13CP2Ch. 9 - Return to the bc_today.js file and change the...Ch. 9 - Prob. 15CP2Ch. 9 - Prob. 1CP3Ch. 9 - Prob. 2CP3Ch. 9 - Prob. 3CP3Ch. 9 - Prob. 4CP3Ch. 9 - Prob. 5CP3Ch. 9 - Above the randomlnt() function insert a command to...Ch. 9 - Prob. 7CP3Ch. 9 - Prob. 8CP3Ch. 9 - Prob. 9CP3Ch. 9 - Prob. 10CP3Ch. 9 - Prob. 2CP4Ch. 9 - Prob. 3CP4Ch. 9 - Prob. 4CP4Ch. 9 - Prob. 5CP4Ch. 9 - Prob. 6CP4Ch. 9 - Prob. 7CP4Ch. 9 - Prob. 8CP4Ch. 9 - Explore 9. Scroll back to the top of the file and,...Ch. 9 - Prob. 10CP4Ch. 9 - Prob. 13CP4
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- Return to the links.js file in your editor and create an event listener for the load event that runs an anonymous function. Within the anonymous function, create the allSelect variable referencing all select elements nested within the govLinks form. Loop through the allSelect object collection and for each selection list in the collection create an anonymous function for the onchange event. Within this anonymous function, use the href property of the location object to change the page shown in the browser window to the value of the target of the event object that initiated the onchange event. Document your commands with JavaScript comments.arrow_forwardTrue or False .Each of our header and trailer sentinels contain an actual element.arrow_forwardCreate another HTML File with YourNameReggNoQ2.html (Add this step screen shot too) which contains the course registration form for the training institute as given below: Course Registration First Name Choose at least two courses Middle Name Python Web Designing Last Name SEO Gender O Male Female E-Commerce CNIC Session Cell No Morning Evening Email Weekend Reset Submit a) Write JavaScript that reads the value of each input element filled by the user and Qisplay the same information on the same HTML page, after the form submissionarrow_forward
- HTML/CSS JAVASCRIPT please help me answer this question I will give you a good rating Thank you! Given the following word search application, which searches for words in paragraphs, modify it so that it Adds two spans tab within the HTML within the designated new "Illustate" text segments as shown below. Has a new click event which searches the occurrence of the word within all span tabs residing within the first div container , then highlights the text in the span tab which contains the word c) In the same routine, count the number of times ( using a global variable) that the word is found Within the object array loop for span tabs ( where the indexOf statement is located) and after all span tabs are highlighted, send that number to a new html element ( a div, h1, span, p choice is up to you). The count should be continually accumulated and should show the total number of times a word is found in a span tab for all user activated clicks of the search button for…arrow_forwardAssignment For assignments 1 and 2, your Big-O notation and justification will be written in the HTML section of JSFiddle. You will be using the Javascript array Programming Assignment Part 1 – Using your JSFiddle account and JavaScript, you will create a program that will instantiate an integer array of a specified size. This means you must create a text box interface and a button “Create Array”. Put a default value of 100 in the Text Box. When the user clicks “Create Array” create an array and fill each array element with a random integer between 1 and 100. You will need to research the random function to do this (the JavaScript function is Math.random()). This array should be a global variable. You will next need an interface (same JSFiddle) with a second and third Text Box and button. The button will say “Insert into Array”. It will trigger a function that will read a number from the second Text Box and insert it into the array at the index of the third Text Box. This will be done…arrow_forwardI need help with this, please. Thanks Develop an Expand/Collapse application using JQUERYIn this exercise, you’ll develop an application that displays the first paragraph of text for three topics and then lets the user click a link to expand or collapse the text for each topic.2. Review the HTML. Note that each topic consists of two div elements followed by an <a> element. Also, note that a class named “hide” is assigned to the second div element of each topic. Then, review the style rule for this class.3. In the JavaScript file, add an event handler for the ready() event method.4. Within the ready() event method, code an event handler for the click() event method of the <a> elements. This event handler should start by preventing the default action of the link and storing the clicked link in a constant. Then, it should use the toggleClass() method to add or remove the “hide” class from the div element above the link element that’s clicked depending on whether that class is…arrow_forward
- Event Listeners Return to the mas_register.js file in your editor. Directly below the initial comment section, insert an event listener for the window load event. Run an anonymous function in response to the event containing the following commands: Call the calcCart() function (which you will create shortly.) Create an onclick event handler for the regSubmit button that runs the sessionTest() function when the button is clicked. Create onblur event handlers for the input boxes with the ids: fnBox, lnBox, groupBox, mailBox, phoneBox, and banquetBox, running the calcCart() function in response to each event. Create an onchange event handler for the sessionBox selection list, running the calcCart() function when the selection list is changed. Create an onclick event handler for the mediaCB check box, running the calcCart() function in response. JavaScript Functions Create the sessionTest() function. The purpose of this function is to provide a validation test for the conference session…arrow_forwardOpen the application in the folder under the coursework. Open the HTML file and notice that an Invoice Date field has been added. Then, open the HTML file and notice that it includes a getFormattedDate() function that formats the Date object that’s passed to it in MM/DD/YYYY format and then returns the date string. Start the application, enter a subtotal, and click the Calculate button. Note that nothing is displayed in the Invoice Date field. In the click() event handler for the Calculate button, add code that gets the current date and formats it using the getFormattedDate() function. Then, add code that provides a default value of the formatted current date for the invoice date. Note that if an invoice date is entered, that date isn’t validated. Add code that sets the value of the Invoice Date field. If you’ve done this right, the application should display the current date when you click the Calculate button without entering anything in the Invoice Date field. <!DOCTYPE…arrow_forwardDisplay only 2 lines of Urnamefile1.txtarrow_forward
- Open the HTML and JavaScript files provided as start up files (index.html and navigation.js). Then, run the application and notice that when you click on a link in the sidebar, the page is scrolled so the information for the speaker associated with that link is displayed. In other words, this application works even if JavaScript is disabled. In the JavaScript file, add an event handler for the ready event method. Then, within the function for that event handler, add jQuery code that hides the heading and article for all but the first speaker. Add an event handler for the click event of the <a> elements in the sidebar. Then, within the function for that event handler, add jQuery code that hides all the speaker information, gets the value of the href attribute of the link that was clicked, and then uses that value to display the heading and article for the speaker associated with that link.arrow_forward<style>// selecting required elementconst element = document.querySelector(".pagination ul");let totalPages = 10;let page = 2; //calling function with passing parameters and adding inside element which is ul tagelement.innerHTML = createPagination(totalPages, page);function createPagination(totalPages, page){ let liTag = ''; let active; let beforePage = page - 1; let afterPage = page + 1; if(page > 1){ //show the next button if the page value is greater than 1 liTag += `<li class="btn prev" onclick="createPagination(totalPages, ${page - 1})"><span><i class="fas fa-angle-left"></i> Prev</span></li>`; } // how many pages or li show before the current li if (page == totalPages) { beforePage = beforePage - 2; } else if (page == totalPages - 1) { beforePage = beforePage - 1; } // how many pages or li show after the current li if (page == 1) { afterPage = afterPage + 2; } else if (page == 2) { afterPage = afterPage +…arrow_forwardWhich of the following assigns the highest column subscript in the array to the intHighCol variable?a. intHighCol = decSales.GetHighest(1)b. intHighCol = decSales.GetHighSub(1)c. intHighCol = decSales.GetUpperBound(1)d. intHighCol = decSales.GetUpperBound(0)arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- New Perspectives on HTML5, CSS3, and JavaScriptComputer ScienceISBN:9781305503922Author:Patrick M. CareyPublisher:Cengage LearningNp Ms Office 365/Excel 2016 I NtermedComputer ScienceISBN:9781337508841Author:CareyPublisher:CengageCOMPREHENSIVE MICROSOFT OFFICE 365 EXCEComputer ScienceISBN:9780357392676Author:FREUND, StevenPublisher:CENGAGE L
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:9781305503922
Author:Patrick M. Carey
Publisher:Cengage Learning
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:9780357392676
Author:FREUND, Steven
Publisher:CENGAGE L