Question: The Javascript file provided for the assignment is blank. This is the HTML file if needed for reference. Need the Javascript portion. HTML: https://pastecode.xyz/view/1e6b421f Please
The Javascript file provided for the assignment is blank. This is the HTML file if needed for reference. Need the Javascript portion.
HTML: https://pastecode.xyz/view/1e6b421f
Please help!

1 . Use your editor to open the sd-map-txt.html and sd-mapper-txt.js files from the htm109 case1 folder. Enter your name and the date in the comment section of each file, and save them as sd_map.html and sd_mapper.js respectively 2. Go to the sd map.html file in your editor. Directly above the closing tag, insert a script element that links the page to the sd_mapper.js file. Defer the loading of the script file until after the rest of the web page is loaded by the browser 3. Study the contents of the file and then save your changes 4. Go to the sd_mapper.js file in your editor. At the top of the file, insert a statement to apply your 5. Declare a variable named this Time containing a Date object for February 3, 2018 at 6. Use the toLocalestring) method to save the text of the thisTime variable in the timeStr 7. Change the inner HTML code of the page element with the ID timestamp to the value of the 8. Next, you will determine which sky map to show in the web page. First, create a variable named 9. Create a variable named thisMonth using the getMonth) method to extract the month number 0. The number of the map to use with the given hour and month is calculated with the formula JavaScript code with strict usage 3:15:28 a.m variable timeStr variable thisHour, using the getHours) method to extract the hour value from the thisTime variable from the thisTime variable (2month + hour) % 24 where month is the value of the thisMonth variable and hour is the value of the thisHour variable. Store the value of this formula in the mapNum variable 1. You wil use JavaScript to write the HTML code for the inline element showing the sky image to use in the web page. Create a variable named imgStr that stores the following text string where Map is the value of the mapNum variable. (Hint: Use theoperator to combine text strings together and be sure to include the single quote character within the text strings.) 2. For the page element with the ID planisphere, use the insertAdjancentHTMLto insert the value of the imgStr variable directly after the element's opening tag 3. Add descriptive comments to the file, documenting your work. 4. Save your changes to the file and then open sd map.html in your browser. Verify that your 5. Return to the sd mapper.js file in your editor. Modify the command that creates the this Time 6. Reload sd_map.html in your browser and verify that it shows the current date and time along planisphere map and date and time resemble that shown in Figure 9-41 variable so that it uses the current date and time, whatever that may be with the star map for the sky at that moment. 1 . Use your editor to open the sd-map-txt.html and sd-mapper-txt.js files from the htm109 case1 folder. Enter your name and the date in the comment section of each file, and save them as sd_map.html and sd_mapper.js respectively 2. Go to the sd map.html file in your editor. Directly above the closing tag, insert a script element that links the page to the sd_mapper.js file. Defer the loading of the script file until after the rest of the web page is loaded by the browser 3. Study the contents of the file and then save your changes 4. Go to the sd_mapper.js file in your editor. At the top of the file, insert a statement to apply your 5. Declare a variable named this Time containing a Date object for February 3, 2018 at 6. Use the toLocalestring) method to save the text of the thisTime variable in the timeStr 7. Change the inner HTML code of the page element with the ID timestamp to the value of the 8. Next, you will determine which sky map to show in the web page. First, create a variable named 9. Create a variable named thisMonth using the getMonth) method to extract the month number 0. The number of the map to use with the given hour and month is calculated with the formula JavaScript code with strict usage 3:15:28 a.m variable timeStr variable thisHour, using the getHours) method to extract the hour value from the thisTime variable from the thisTime variable (2month + hour) % 24 where month is the value of the thisMonth variable and hour is the value of the thisHour variable. Store the value of this formula in the mapNum variable 1. You wil use JavaScript to write the HTML code for the inline element showing the sky image to use in the web page. Create a variable named imgStr that stores the following text string where Map is the value of the mapNum variable. (Hint: Use theoperator to combine text strings together and be sure to include the single quote character within the text strings.) 2. For the page element with the ID planisphere, use the insertAdjancentHTMLto insert the value of the imgStr variable directly after the element's opening tag 3. Add descriptive comments to the file, documenting your work. 4. Save your changes to the file and then open sd map.html in your browser. Verify that your 5. Return to the sd mapper.js file in your editor. Modify the command that creates the this Time 6. Reload sd_map.html in your browser and verify that it shows the current date and time along planisphere map and date and time resemble that shown in Figure 9-41 variable so that it uses the current date and time, whatever that may be with the star map for the sky at that moment
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
