Completed Project 6-2 Do the following: 1. Use your code editor to open the project06- 02_txt.html...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Completed Project 6-2 Do the following: 1. Use your code editor to open the project06- 02_txt.html and project06-02_txt.js files from the js06 ► project02 folder. Enter your name and the date in the comment section of each file and save them as project06- 02.html and project06-02.js, respectively. 2. Go to the project06-02.html file in your code editor and link the page to the project06-02.js file, deferring loading of the script. Study the contents of the file and note that with each option the URL address is stored as the options value. Save your changes to the file. 3. Go to the project06-02.js file in your code editor. Add an event listener that runs an anonymous function when the page loads. 4. Within the anonymous function, add a statement that uses the querySelectorAll() method to create a node list of all elements matching the CSS selector form#govLinks select. Store the node list in the allSelect variable. 5. Also, within the anonymous function: Insert a for loop that iterates through all of the contents of the allSelect node list. At each iteration of the allSelect node list do the following: 1. Apply the onchange event handler to allSelect[i] to run an anonymous function when the selection list option is changed. Add the parameter evt to the anonymous function. 2. Within the nested anonymous function retrieve the value property of evt.target and store it in the linkURL variable. 3. Within the nested anonymous function: Use the window.open() method to open a new browser window with linkURL as the url of the window. You do not have to set a name for the window or any window options. Store the window under the newWin variable. 6. Save your changes to the file and then open project06-02.html in your web browser. 7. Verify that by selecting an entry from one of three selection lists, the web page for that entry opens in a new browser tab or window. Completed Project 6-2 Do the following: 1. Use your code editor to open the project06- 02_txt.html and project06-02_txt.js files from the js06 ► project02 folder. Enter your name and the date in the comment section of each file and save them as project06- 02.html and project06-02.js, respectively. 2. Go to the project06-02.html file in your code editor and link the page to the project06-02.js file, deferring loading of the script. Study the contents of the file and note that with each option the URL address is stored as the options value. Save your changes to the file. 3. Go to the project06-02.js file in your code editor. Add an event listener that runs an anonymous function when the page loads. 4. Within the anonymous function, add a statement that uses the querySelectorAll() method to create a node list of all elements matching the CSS selector form#govLinks select. Store the node list in the allSelect variable. 5. Also, within the anonymous function: Insert a for loop that iterates through all of the contents of the allSelect node list. At each iteration of the allSelect node list do the following: 1. Apply the onchange event handler to allSelect[i] to run an anonymous function when the selection list option is changed. Add the parameter evt to the anonymous function. 2. Within the nested anonymous function retrieve the value property of evt.target and store it in the linkURL variable. 3. Within the nested anonymous function: Use the window.open() method to open a new browser window with linkURL as the url of the window. You do not have to set a name for the window or any window options. Store the window under the newWin variable. 6. Save your changes to the file and then open project06-02.html in your web browser. 7. Verify that by selecting an entry from one of three selection lists, the web page for that entry opens in a new browser tab or window.
Expert Answer:
Answer rating: 100% (QA)
Based on the instructions provided it looks like youre working on a project involving HTML and JavaScript The project involves linking an HTML file to ... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
SummaryOnline BookwormsA preview of the page you will create is shown below.Instructions ?|Daniel Palmer is a content manager of Online Bookworms, a website dedicated to lovers of books and reading....
-
The pilot of a small boat charts a course such that the boat will always be equidistant from an upcoming rock and the shoreline. Describe the path of the boat. If the rock is 2 miles offshore, write...
-
What two forces act on you while you are in a moving elevator? When are these forces of equal magnitude and when are they not?
-
Two students, Miguel Melo and Cody Watson, compared textbook prices at the campus bookstore and Amazon.com. To be fair, they included the sales tax for the local store and added shipping for Amazon....
-
A distillation tower with sieve trays is to separate benzene from mono-chlorobenzene. Conditions at a plate near the bottom of the column are: Vapor Phase Mass flow rate \(=24,850 \mathrm{lb} /...
-
A thin electrical heater is wrapped around the outer surface of a long cylindrical tube whose inner surface is maintained at a temperature of 5C. The tube wall has inner and outer radii of 25 and 75...
-
Assume the zero-coupon yields on default-free securities are as summarized in the following table: Maturity 1 year 2 years 3 years 4 years 5 years Zero-Coupon Yields 3.20% 3.60% 3.80% 4.00% 4.20%...
-
Robin is a new employee at Big Tech Computers and is debating whether to enroll in a POP with the opportunity for an FSA or an HDHP with an opportunity for an HSA. The POP premium is $550 per month...
-
What is symatric difference in maths?
-
A certain light truck can go around a flat curve having a radius of 140 m with a maximum speed of 27.0 m/s. With what maximum speed can it go around a curve having a radius of 89.0 m?
-
How does the implementation of a centralized database system impact the efficiency and data accuracy in a large retail organization?
-
Write a project proposal on Predictive Policing Using Long Short Term Memory. The proposal must contain but not limted to; Abstract Introduction Project Problem Statement Objectives and Expectations...
-
How does the concept of moral relativism intersect with discussions surrounding ethical behavior in diverse cultural contexts ?
-
If the Rydberg energy is 1 3 . 6 eV , what is the wavelength of light emitted when the electron drops from confined level n = 2 to n = 1 ?
-
G is employed by a Canadian-controlled private corporation. In year 1, G was granted a stock option to acquire 4,000 shares from the treasury of his employers corporation for $11 a share. At the time...
-
For what reason might an exporter use standard international trade documentation (letter of credit, draft, order bill of lading) on an intrafirm export to its parent or sister subsidiary?
-
Leslie is a single taxpayer who is under age 65 and in good health. For 2012, she has a salary of $23,000 and itemized deductions of $1,000. Leslie is entitled to one exemption on her tax return. a....
-
Bill and Guilda each own 50 percent of the stock of Radiata Corporation, an S corporation. Guilda's basis in her stock is $25,000. On July 31, 2012, Bill sells his stock, with a basis of $40,000, to...
-
During 2012, William purchases the following capital assets for use in his catering business: New passenger automobile (September 30)........................$21,500 Baking equipment (June 30)...
-
In 2022, Mark purchased two separate activities. Information regarding these activities for 2022 and 2023 is as follows: The 2022 losses were suspended losses for that year. During 2023, Mark also...
-
In 2023, Julie, a single individual, reported the following items of income and deduction: Julie owns 100% and is an active participant in the rental real estate activity. What is her taxable income...
-
Jerry sprayed all of the landscaping around his business with a pesticide in June 2023. Shortly thereafter, all of the trees and shrubs unaccountably died. The FMV and the adjusted basis of the...
Study smarter with the SolutionInn App