{ "key_pair_value_system": true, "answer_rating_count": "", "question_feedback_html": { "html_star": "", "html_star_feedback": "" }, "answer_average_rating_value": "", "answer_date_js": "2024-09-10T13:17:17-04:00", "answer_date": "2024-09-10 13:17:17", "is_docs_available": "", "is_excel_available": "", "is_pdf_available": "", "count_file_available": 0, "main_page": "student_question_view", "question_id": "10101419", "url": "\/study-help\/questions\/javascript-help-in-this-exercise-you-will-create-a-program-10101419", "question_creation_date_js": "2024-09-10T13:17:17-04:00", "question_creation_date": "Sep 10, 2024 01:17 PM", "meta_title": "[Solved] JavaScript help. In this exercise, you wi | SolutionInn", "meta_description": "Answer of - JavaScript help. In this exercise, you will create a program that writes user input from a text box to a list on the w | SolutionInn", "meta_keywords": "javascript,help,exercise,will,create,program,writes,user,input,text,box,list", "question_title_h1": "JavaScript help. In this exercise, you will create a program that writes user input from a text box to a list on the web page.", "question_title": "JavaScript help. In this exercise, you will create a program that writes", "question_title_for_js_snippet": "JavaScript help In this exercise, you will create a program that writes user input from a text box to a list on the web page Your program will also write a thank you message to the page after the user has entered five items Finally, youll also create a backward compatible event listener for the Submit button 1 At the bottom of the document, before the closing tag, create a new script section 2 Within the script section create two global variables one named i with a value of 1, and the other named listItem with its value set to an empty string 3 Below the variables, create a function called processInput() Within the function, create an if statement that runs if the value of i is less than or equal to 5 The if statement should perform the following actions a Set the value of the listItem variable to the string item concatenated with the value of i b Set the content of the element with an id equal to listItem to the value of the element with the id of toolbox c Set the value of the element with the id of toolbox to an empty string 4 Before the closing of the if statement, create a nested if statement If the value of i is equal to 5, the statement should change the content of the element with the id of resultsExpl to the string Thanks for your suggestions 5 Before the closing of the main if statement, after the nested if statement, add a statement to increment the value of i by 1 6 Add a backward compatible event listener for the click event to the Submit button (with the id of button) 7 Add comments to document your work, and then save your work Open index htm in a browser, type the name of a tool in the text box, and then click Submit The name of the tool you typed is added to the bulleted list on the right side of the web page Enter the names of four more tools, clicking Submit after each one After you enter the fifth name, the text Thanks for your suggestions is displayed below the bulleted list 8 Fix any errors in your code until it works as you expect Hands on Project 3 4 Hands on Project 3 4 Type the name of a tool, then click Submit Submit", "question_description": "

JavaScript help.<\/p>

In this exercise, you will create a program that writes user input from a text box to a list on the web page. Your program will also write a thank-you message to the page after the user has entered five items. Finally, youll also create a backward-compatible event listener for the Submit button.<\/p>

1-At the bottom of the document, before the closing <\/body> tag, create a new script section.<\/p>

2-Within the script section create two global variables: one named i with a value of 1, and the other named listItem with its value set to an empty string.<\/p>

3-Below the variables, create a function called processInput(). Within the function, create an if statement that runs if the value of i is less than or equal to 5. The if statement should perform the following actions:<\/p>

a- Set the value of the listItem variable to the string item concatenated with the value of i.<\/p>

b- Set the content of the element with an id equal to listItem to the value of the element with the id of toolbox.<\/p>

c- Set the value of the element with the id of toolbox to an empty string.<\/p>

4-Before the closing } of the if statement, create a nested if statement. If the value of i is equal to 5, the statement should change the content of the element with the id of resultsExpl to the string Thanks for your suggestions.<\/p>

5-Before the closing } of the main if statement, after the nested if statement, add a statement to increment the value of i by 1.<\/p>

6-Add a backward-compatible event listener for the click event to the Submit button (with the id of button).<\/p>

7-Add comments to document your work, and then save your work. Open index.htm in a browser, type the name of a tool in the text box, and then click Submit. The name of the tool you typed is added to the bulleted list on the right side of the web page. Enter the names of four more tools, clicking Submit after each one. After you enter the fifth name, the text Thanks for your suggestions. is displayed below the bulleted list<\/p>

8-Fix any errors in your code until it works as you expect.<\/p>

<\/p>

<\/p>

<\/p>

<\/p>

<\/p>

Hands-on Project 3-4<\/title><\/p> <p> <link rel=\"stylesheet\" href=\"styles.css\" \/><\/p> <p> <script src=\"modernizr.custom.05819.js\"><\/script><\/p> <p><\/head><\/p> <p><body><\/p> <p> <header><\/p> <p> <h1><\/p> <p> Hands-on Project 3-4<\/p> <p> <\/h1><\/p> <p> <\/header><\/p> <p> <article><\/p> <p> <div id=\"results\"><\/p> <p> <ul><\/p> <p> <li id=\"item1\"><\/li><\/p> <p> <li id=\"item2\"><\/li><\/p> <p> <li id=\"item3\"><\/li><\/p> <p> <li id=\"item4\"><\/li><\/p> <p> <li id=\"item5\"><\/li><\/p> <p> <\/ul><\/p> <p> <p id=\"resultsExpl\"><\/p><\/p> <p> <\/div><\/p> <p> <form><\/p> <p> <fieldset><\/p> <p> <label for=\"toolBox\" id=\"placeLabel\"><\/p> <p> Type the name of a tool, then click Submit:<\/p> <p> <\/label><\/p> <p> <input type=\"text\" id=\"toolBox\" \/><\/p> <p> <\/fieldset><\/p> <p> <fieldset><\/p> <p> <button type=\"button\" id=\"button\">Submit<\/button><\/p> <p> <\/fieldset><\/p> <p> <\/form><\/p> <p> <\/article><\/p> <p><\/body><\/p> <p><\/html><\/p>", "transcribed_text": "", "related_book": { "title": null, "isbn": null, "edition": null, "authors": null, "cover_image": null, "uri": null, "see_more_uri": "" }, "free_related_book": { "isbn": "", "uri": "", "name": "", "edition": "" }, "question_posted": "2024-09-10 13:17:17", "see_more_questions_link": "\/study-help\/questions\/computer-science-operating-system-2022-August-09", "step_by_step_answer": "The Answer is in the image, click to view ...", "students_also_viewed": [ { "url": "\/study-help\/introduction-to-probability-statistics\/1154-reaction-times-vs-stimuli-twentyseven-people-participated-in-an-1987545", "description": "11.54 Reaction Times vs. Stimuli Twenty-seven people participated in an experi- ment to compare the effects of five different stimuli on reaction time. The experiment was run using a com- pletely...", "stars": 0 }, { "url": "\/a-using-the-letters-provided-indicate-how-each-of-the", "description": "(a) Using the letters provided, indicate how each of the items should be reported in an Enterprise Fund statement of cash flows for Kauffman County. 1. Cash received from sales to public . . . . . ....", "stars": 3 }, { "url": "\/study-help\/questions\/multiple-choice-question-76-at-the-beginning-of-2018-blossom-10026727", "description": "Multiple Choice Question 76 At the beginning of 2018; Blossom, Inc. had a deferred tax asset of $19000 and a deferred tax liability of $29000. Pre-tax accounting income for 2018 was $1480000 and the...", "stars": 3 }, { "url": "\/study-help\/questions\/a-10mm-diameter-tungsten-carbide-sphere-under-a-30507-63a-3248782", "description": "A 10-mm diameter tungsten carbide sphere under a 3,0507 \/63a Pte en creates a 3.27 mm diameter impression on a TI-6Al-4V orthopedic implant alloy. What is the Brinne hardness number of this alloy", "stars": 3 }, { "url": "\/study-help\/questions\/the-performance-of-a-technical-device-is-described-by-m-724265", "description": "The performance of a technical device is described by m quality measures fj: R\" R, j = 1, ..., m. The smaller their values the better the performance is. The requirements of technical feasibility...", "stars": 3 }, { "url": "\/study-help\/questions\/1-evaluate-the-sums-and-products-below-for-a-few-731828", "description": "(1) Evaluate the sums and products below for a few small values of n. Then make a conjecture about the value of the sum and product for all positive integers n, and prove your conjecture by...", "stars": 3 }, { "url": "\/study-help\/questions\/in-the-two-debugging-exercises-below-can-someone-point-out-732414", "description": "In the two debugging exercises below can someone point out to me where errors are and what Correct coding is to fix the errors. \/\/ Program asks students for score on test and displays corresponding...", "stars": 3 }, { "url": "\/study-help\/questions\/1-oliver-patrick-quincy-llp-is-beginning-liquidation-it-4188550", "description": "1. Oliver, Patrick & Quincy LLP, is beginning liquidation. It has no cash, total liabilities of P60,000 including a P10,000 loan payable to Patrick, and equal partners' capital account balances of...", "stars": 3 }, { "url": "\/study-help\/questions\/jump-to-level-1-a-multimedia-application-allows-users-to-733199", "description": "Jump to level 1 A multimedia application allows users to create and edit their own songs and videos The customer owns the servers used in customer facilities. Which layers are managed by the...", "stars": 3 } ], "next_back_navigation": { "previous": "\/study-help\/questions\/the-contribution-margin-ratio-of-donath-corporations-only-product-is-10101418", "next": "\/study-help\/questions\/timedriven-dynamic-mc-simulation-of-an-av-consider-an-autonomous-10101420" }, "breadcrumbs": [ { "name": "Study help", "link": "https:\/\/www.solutioninn.com\/study-help\/questions-and-answers" }, { "name": "Computer Science", "link": "https:\/\/www.solutioninn.com\/study-help\/questions-and-answers\/computer-science" }, { "name": "Databases", "link": "https:\/\/www.solutioninn.com\/study-help\/questions\/computer-science-databases" }, { "name": "JavaScript help. In this exercise, you will create a program that writes", "link": "https:\/\/www.solutioninn.com\/study-help\/questions\/javascript-help-in-this-exercise-you-will-create-a-program-10101419" } ], "skill_details": { "skill_id": "656", "skill_name": "Databases", "parent_id": "8" } }