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 9CP2
Program Plan Intro
To call function getEvent using thisDay as an argument and storing the value returned by it in variable named eventHTML.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Hands-On Project 1-3In this project, you will explore how to write text to a specific element in your web page in response to theonclick event handler. To complete the exercise, you will apply the following JavaScript expression:document.getElementById('id').innerHTML = 'text';where id is the value of the id attribute for the page element and text is the text of the content to be writteninto the element. You will use this expression to enhance a web form by displaying the message “Thank you foryour order” when the user clicks the Submit button. Figure 1-25 shows the completed web page.Do the following:1. Use your code editor to open project01-03_txt.html from the HandsOnProject_01 folder. Enter your name and the date in the comment section of the document and save it as project01-03.html.2. Scroll down to the bottom of the file and locate the input element for the Submit button.3. Add an onclick event handler to the <input> tag that changes the innerHTML value of the page element…
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).
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]…
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
- While examining a web form and the JavaScript source code for it, you notice that a function that changes the text displayed in one part of the page is being executed every time you type or delete a letter or number in a text entry field labeled “Message,” instead of when you press the Tab key to move to the next form field. You correctly guess that _____. a. the function is being triggered when the form element labeled “Message” loses the focus b. the function must be triggered by a change event because input events do not apply to text entry boxes c. anonchangeevent handler has been applied to the form element labeled “Message” d. an event listener for theinputevent is attached to the form element labeled “Message”arrow_forwardHTML PROJECTarrow_forward8.jquerxm.arrow_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_forwardso which option is correct from this There should not be a >bracket at the end. The language attribute name in the <html> tag should not be lang. There should not be a <body> tag There should be quote marks around the content ID in the second <div> tag.arrow_forwardCreate an HTML form to allow the user to enter student names, one at a time, and displays all the names entered in a text area. Each time, the user types a name into a text box, and then presses the ENTER key to add the name in the text box to an array. The array is then sorted in alphabetical order and text area is updated with the new content in the array. Hints: you may use use keypress event. The event handler can take a parameter event. When the Enter key is pressed, the corresponding event.keyCode would be equal to 13.arrow_forward
- Q1. POEM Form Using the poem about the days Monday-Sunday below, create a form that will return the relevant line in response to the user's choice of day. For the form it will be good idea to have a drop down list for the days. In order to display the relevant line via PHP; submission could be done to a different php page or a self-calling page could be created. Ps. For submission via JavaScript; on change event "if(this.value != '0') this.form.submit()" could be used. Days of week Poem: Monday is the very first day. On Tuesday my friends come to play. Wednesday the week is half way through On thursday I don't feel so blue On friday I get all excited On Saturday I'm invited to parties On Sunday I need rest.arrow_forwardWrite the HTML code and PHP code in the same file for the question below: Use a form to ask what the user's name is and what the user's email address is. In the code, after the user input validation, generate feedback that prints either "Thank you for your submission!" or "Please fill out both questions.".arrow_forwardUsing React create a header component that displays a logo and company name. It should be able to welcome a user to the site or ask them to sign in, depending on boolean input. Create a landing page component that tells the user about the company. Create a product component that displays information about the products that the company sells. Edit your existing App.js file so that it displays the header component, the landing page component and at least three product components. Use an array of values and props to do this. Pass props to the header component to specify whether the user is logged in or not.arrow_forward
- 1. For this question, you will create sectionc.html document, in which you build: a. A select list element that has 4 options (Spring, Summer, Fall, Winter), and element with id="season" that shows a picture of the selected season, Default is Winter as seen in Figure 1. b. Using a JavaScript function changepic (), if you change the value on the list, the picture of the season will change accordingly, e.g. if you select spring, the season div will show the image spring.jpg. c. The JavaScript function changepic () must be implemented in a file named allseasons.js which must be stored in js folder on assignment3 structure, your document referring to the external JavaScript file in the tag. As . d. Refer to the pictures in sectionc.html as . e. Once you are done, upload sectionc.html into html dir, allseasons.js into js dir, and all pictures into pictures dir in assignmet3 structure. Winter Figure 1: AllSeason Dropdown listarrow_forwardNot same as already posted.arrow_forwardHTML/JAVASCRIPT Take the attached application and modify the second function so that if the user enters ANY name , for example Lawrence Michael Wolk into the input box next to the second function, the span output will be L.Michael.W. So if the name were instead Michael William Jackson, the output will be M.Wiiliam.J. (See output png attachments) CISC_2350_CH_8_pp300_converter_asplithw.html <html> <head> <script src="split.js" defer></script> </head> <body> <h1>Name Converter</h1> <p>Type your name:</p> <div> <input id="name" type="text" size="24" /> </br> <span id ="span1">second output goes here</span></br> <button id="but0">Convert to last, First</button> </br></br> <button id="buta"> Convert From Name MI. Lname to FI.MI.LI.</button></br> <input id ="name1" type ="text" size ="24"/> <span id= "span2">Third output goes here</span>…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 Learning
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:9781305503922
Author:Patrick M. Carey
Publisher:Cengage Learning