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
-
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...
-
The following information is for Hudson Corporation. HUDSON CORPORATION Bank Reconciliation August 31 ..........................................................................$41,720 Add: Deposits...
-
Design a rewards system to encourage intrapreneurship.
-
What height of chimney is required to produce a draught of \(20 \mathrm{~mm}\) of water column, if \(15 \mathrm{~kg}\) of air is required to burn \(1 \mathrm{~kg}\) of coal? The mean temperature of...
-
A city orders a new computer for its General Fund at an anticipated cost of $88,000. Its actual cost when received is $89,400. Payment is subsequently made. Give all required journal entries for...
-
Presupuesto de Efectivo CASO: Loblaw Manufacturing le ha pedido que cree un presupuesto en efectivo para determinar sus necesidades de financiamiento para el periodo de junio a octubre. Usted ha...
-
Bill and Kate Theil are not only husband and wife but entrepreneurs who have established three successful businesses. The proposed plan for their latest effort involves a series of international...
-
Artie, a 36 y/o male, comes to the clinic with chief complaint of: intermittent flank one side flank pain. The pain is an 8 on a scale of 1-10, with 10 being the worst pain he has ever felt. He...
-
John borrows 50000 dollars from a bank that charges interest at an annual rate of 6 percent, compounded monthly. Calculate the monthly payment that John would have to make in order for the loan to be...
-
As shown, a pipe is anchored to a wall at point A. During the pipe's installation, several forces are applied to the pipe at different locations. If F = 76.9 N, F2 = 76.2 N, F3 = 74.0 N, F4 = 70.5 N,...
-
What is the Black-Scholes model, and how is it used in financial engineering?
-
Graphically show the optimal production level when the selling (market) price is between the AVC min and the AC min. Explain at which production levels the company has loss and where is the even...
-
Build a quantitative model to analyze the development and sale of a bicycle light. Assume that you could sell 20,000 units per year for five years at a sales price (wholesale) of $20 per unit and a...
-
3. What ways can executives and other organizational leaders learn about day-to-day business operations besides going "undercover?" 1. What are some of the things managers can learn by walking around...
-
What is EBIT/eps analysis? What information does it provide managers?
-
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,...
-
Which of the following is least important as a reason for a written investment policy statement (IPS)? A. The IPS may be required by regulation. B. Having a written IPS is part of best practice for a...
-
Which of the following best describes the underlying rationale for a written investment policy statement (IPS)? A. A written IPS communicates a plan for trying to achieve investment success. B. A...
-
A written investment policy statement (IPS) is most likely to succeed if: A. Created by a software program to assure consistent quality. B. It is a collaborative effort of the client and the...
Study smarter with the SolutionInn App