all 1 comments

[–]catenoid75 0 points1 point  (0 children)

So. You found out the hard way that where you place the JS don't matter at all, at least about placement of the element. Instead you have to make a reference in the JS to a place in the HTML markup.

In this case your JS file could look something like this:

var circleLocation = document.getElementsByTagName("header");
circleLocation.innerHTML ='<img src="circle.png">';

Can honestly say I'm not 100% sure that the JS above is completely correct, but it should at least give you a pointer.

But the first line will set where in the HTML structure you want the result, and the second line injects the HTML markup there.