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.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.