Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

When I press map on my html page, it needs to call a function form my javascript

ID: 3936838 • Letter: W

Question

When I press map on my html page, it needs to call a function form my javascript code in order to put a image on a new, blank webpage(named page). How do i do this? Don't output the image onto the current page, it needs to be inside the new page. Thanks! here is html code:

<tr>
       <td> Maps</td>
       <td> Display a pinpoint location of Akron's campus</td>
       <td> <button>map</button></td>
   </tr>
  

and here is javascript code:

function location(){ //can't get image to show in new webpage
       page += <img src="test.png";
   }

Explanation / Answer

<tr>
<td> Maps</td>
<td> Display a pinpoint location of Akron's campus</td>
<td> <button>map</button></td>
</tr>

The javascript function is as follows:

function show(){ //can't get image to show in new webpage

//open the new page to print the image

var new_page = window.open();

new_page.document.write("<img src="test.png">");
}

use the function with name other than location.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote