The follow code isn't working, I'll probably have to supply more info :)

var headline = document.getElementById('header');
var headlineParent = headline.parentNode;
var outputResults = document.getElementById('goat');
outputResults.innerHTML (outputResults);

innerHTML is a property not a method or function.
Example:
outputResults.innerHTML = "<p> HELLO WORLD </p>";

Below is the HTML that goes along with the code. I want to write in the ID#Goat span. I know I did something wrong !

<html>

<head>
<script language="javascript" type="text/javascript">
<src=document-test.js></script>
<title></title>

</head>

<body>
<div id="boxa">
<h1 id = "header">This is an emergency</h1>
<p>what is going on<span id="goat"></span>
</div>
</body>

</html>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.