The point is to 1) create the form, 2) collect data from the form, 3) do some
Fantastic news! We've Found the answer you've been seeking!
Question:
The point is to 1) create the form, 2) collect data from the form, 3) do some calculations with the data and 4) send output to the page that differs depending on what you filled in the form. You also will be graded on the use of functions and organizing your code.
Complete the assignment below.
Process the form using JavaScript. Don't just re-use the elements and code from the example.
- Validate the user input.
- Show the results to the end user on the web page.
- Show the results to the end user in a dialogue window.
- Thoroughly document all JavaScript.
make a similar code as the one attached below: be sure it has calculations with data.
don't worry about the link/stylesheets
Transcribed Image Text:
Unit 5: Homework Lesson: CS240DLS1A2022 We... file:///Users/chrismitchell/Downloads/sourceCodeCase Studies-5/chapter09/microg Collector Performance Solar Collector Performance Local Latitude (deg): 39 Panel Slope (deg): 20 Rated Watts per Square Meter: 133 Jan Feb Mar Month: Apr Calculate + W3Schools Online Web Tutorials Tryit Editor v3.7 Homework Help - Q&A from On... ×日 Elements > Console Sources >>> | ⇓ Response ✰ T 1 <!DOCTYPE html> Calculation Results: Latitude Slope Rated Watts Month Watts per Square Meter Assumptions and Instructions: Horizontal panels have a panel slope equal to zero. Positive panel slope tips panels up from horizontal toward South. For southern hemisphere, use negative latitude and negative panel slope. The calculated result is at solar noon on the 21st day of the selected month, assuming no clouds and no shading. Inspect the volunteered values of Latitude, Slope, and Rated Watts. Enter different values to suit your situation. Select a month. Then click the "Calculate" button to display the watts per square meter generated at noon for the selected conditions in the selected month. 2 <html lang="en"> 3 <head> 4 <meta charset="utf-8"> 5 <meta name="author" content="John Dean"> 6 <title>Collector Performance</title> 7 <link rel="stylesheet" href="../library/microgrid.css"> 8 <style> text-align: center; min-width: 500px; /* prevents label wrapping */ form, input: last-child {margin: 10px 20px;} 9 body { 10 11 12 13 14 15 16 17 18 19 } /* position the table */ .center { margin: 10px 0; display: flex; justify-content: center; 20 </style> 21 <script> 22 var form; 23 var altitude; 24 var cosIncidenceAngle; radiation // html element // solar angle above horizon // perpendicular component of // This function invoked by user click on Calculate button 25 26 27 222220 28 29 var table; var row; function calc(solarForm) { values // table of computed performance values // row in displayed table of calculated var monthIndex; // index of selected month ६०३ = 31 32 33 34 35 table = document.getElementById("performance"); row = table.insertRow(table.rows.length); form = solarForm; 36 computeAngles(); // for altitude and cosIncidenceAngle 37 38 row. insertCell(0).innerHTML = form.elements ["latitude"].value; row. insertCell(1).innerHTML = 39 row. insertCell(2).innerHTML = 40 41 row. insertCell(3).innerHTML = 42 43 44 45 46 47 48 49 50 form.elements ["panelSlope"].value; form.elements ["ratedWatts"].value; monthIndex = form.elements ["months"].selectedIndex; document.getElementsByTagName("option") [monthIndex].innerHTML; row. insertCell(4).innerHTML = findWatts(); } //end calc function computeAngles() { var latitude; // earth latitude var panelSlope; // angle of solar panels up from horizontal to south var month; // month number (Jan = 1, Feb = 2, ...) // Using 1985 ASHRAE Fundamentals Guide, Chapter 27, Table 1, > Unit 5: Homework Lesson: CS240DLS1A2022 We... file:///Users/chrismitchell/Downloads/sourceCodeCase Studies-5/chapter09/microg Collector Performance Solar Collector Performance Local Latitude (deg): 39 Panel Slope (deg): 20 Rated Watts per Square Meter: 133 Jan Feb Mar Month: Apr Calculate + W3Schools Online Web Tutorials Tryit Editor v3.7 Homework Help - Q&A from On... ×日 Elements > Console Sources >>> | ⇓ Response ✰ T 1 <!DOCTYPE html> Calculation Results: Latitude Slope Rated Watts Month Watts per Square Meter Assumptions and Instructions: Horizontal panels have a panel slope equal to zero. Positive panel slope tips panels up from horizontal toward South. For southern hemisphere, use negative latitude and negative panel slope. The calculated result is at solar noon on the 21st day of the selected month, assuming no clouds and no shading. Inspect the volunteered values of Latitude, Slope, and Rated Watts. Enter different values to suit your situation. Select a month. Then click the "Calculate" button to display the watts per square meter generated at noon for the selected conditions in the selected month. 2 <html lang="en"> 3 <head> 4 <meta charset="utf-8"> 5 <meta name="author" content="John Dean"> 6 <title>Collector Performance</title> 7 <link rel="stylesheet" href="../library/microgrid.css"> 8 <style> text-align: center; min-width: 500px; /* prevents label wrapping */ form, input: last-child {margin: 10px 20px;} 9 body { 10 11 12 13 14 15 16 17 18 19 } /* position the table */ .center { margin: 10px 0; display: flex; justify-content: center; 20 </style> 21 <script> 22 var form; 23 var altitude; 24 var cosIncidenceAngle; radiation // html element // solar angle above horizon // perpendicular component of // This function invoked by user click on Calculate button 25 26 27 222220 28 29 var table; var row; function calc(solarForm) { values // table of computed performance values // row in displayed table of calculated var monthIndex; // index of selected month ६०३ = 31 32 33 34 35 table = document.getElementById("performance"); row = table.insertRow(table.rows.length); form = solarForm; 36 computeAngles(); // for altitude and cosIncidenceAngle 37 38 row. insertCell(0).innerHTML = form.elements ["latitude"].value; row. insertCell(1).innerHTML = 39 row. insertCell(2).innerHTML = 40 41 row. insertCell(3).innerHTML = 42 43 44 45 46 47 48 49 50 form.elements ["panelSlope"].value; form.elements ["ratedWatts"].value; monthIndex = form.elements ["months"].selectedIndex; document.getElementsByTagName("option") [monthIndex].innerHTML; row. insertCell(4).innerHTML = findWatts(); } //end calc function computeAngles() { var latitude; // earth latitude var panelSlope; // angle of solar panels up from horizontal to south var month; // month number (Jan = 1, Feb = 2, ...) // Using 1985 ASHRAE Fundamentals Guide, Chapter 27, Table 1, >
Expert Answer:
Answer rating: 100% (QA)
DOCTYPE html html langen head meta charsetUTF8 title Solar Collector Performance Calculator title script function calculatePerformance Collect data fr... View the full answer
Related Book For
Thermodynamics An Engineering Approach
ISBN: 978-0073398174
8th edition
Authors: Yunus A. Cengel, Michael A. Boles
Posted Date:
Students also viewed these programming questions
-
Danica Corp. provided the following inventory balances and cost data for the month of June. Direct Materials Work in Process Finished Goods June 1 30 000 15 000 65 000 Production data for the month...
-
Raw materials inventory Work in process inventory-Cutting Work in process inventory-Stitching Finished goods inventory Beginning Inventory $ 56,000 143 500 163,300 40,100 Ending Inventory $ 67,150...
-
The safety and security issues nowadays become one of the forces causing changes in tourism industry in era of millennium. The main concern of this issues more focus on crime rates, terrorism, food...
-
On January 1, 2011, Devco acquired cum div. all the shares of Brooke, at which date the equity and liability sections of Brookes statement of financial position showed the following balances: Share...
-
In a study to examine the relationship between the time required to complete a construction project and several pertinent independent variables, an analyst compiled a list of four variables that...
-
Explain the different kinds of implied warranties the UCC imposes on sellers of goods. Can sellers disclaim these implied warranties? If so, how?
-
Refer to the annual report for CVS Corporation and the financial statements for Southwest Airlines Co. in the Supplement to Chapter 1. Compute the 2004 and 2003 book value per share for both...
-
Haley Company, organized in 2014, has these transactions related to intangible assets in that year: Jan. 2Purchased a patent (5-year life) $280,000. Apr. 1 Goodwill acquired as a result of purchased...
-
Compose an essay of no less than 500 words discussing the topics covered in this unit. Your essay should include thefollowing: Describe at least three public goods provided by public institutions and...
-
Blue State has to pay a one-time business license fee of $F 20 to the City of Providence in order to open a coffee shop. Suppose Blue State's cost function is given by C(y) = F +9y. 1. Is this a...
-
Waiting Line Model-Cost Model 1-analysis the cost model of mm3 2-analysis the cost model of mm4
-
The Demand Versus Capacity Problem Structure. What does it mean to ask "Do we have the capacity cushion to support the upcoming season?". Explain your answer.
-
give examples of companies that performance corporate governance. explain by having corporate how these companies are sustainable.
-
Corporations and individual consumers should have joint responsibility for sustaining the environment. Consumers live on this earth for only a short period of time, and taking care of the environment...
-
How can you ensure the availability of a skilled workplace to implement the business plan?
-
Define workplace bullying. Describe how anger and aggression are utilized by the bully in workplace bullying. Describe an example of workplace bullying that you are personally aware of or have...
-
In the process of reconciling its bank statement for January, Maxi's Clothing's accountant compiles the following information: Cash balance per company books on January 30 Deposits in transit at...
-
Write the binomial probability in words. Then, use a continuity correction to convert the binomial probability to a normal distribution probability. P(x 110)
-
An inventor claims to have developed a heat pump that produces a 200-kW heating effect for a 293 K heated zone while only using 75 kW of power and a heat source at 273 K. Justify the validity of this...
-
Long cylindrical steel rods ( = 7833 kg/m3 and cp = 0.465 kJ/kgoC) of 8-cm diameter are heat-treated by drawing them at a velocity of 2 m/min through an oven maintained at 900oC. If the rods enter...
-
Derive an expression for the speed of sound based on van der Waals' equation of state P = RT(v - b) - a/v2. Using this relation, determine the speed of sound in carbon dioxide at 808C and 320 kPa,...
-
Inferring Adjusting Entries from Account Balance Changes The following schedule shows all the accounts of Brandon Travel Agency that received year-end adjusting entries: \section*{Required:} 1....
-
Preparation of Closing Entries and a Statement of Earnings} Bell Grove Alarm Company provides security services to homes in northwestern Ontario. At year-end 2018, after adjusting entries have been...
-
Adjusting Entries and Financial Statements} You have the following unadjusted trial balance for Rangoon Corporation at December 31, 2018: At year-end, you have the following data for adjustments: a....
Study smarter with the SolutionInn App