JS function calling
<p>I'm starting in JS and have been having trouble with a particular function I'm trying to write. The purpose is to have the text change once the button is pressed. The "nothing" text should change into "You say hi, I say Hey?" With the Hey? being text already on the document.</p>

<p>Here's the code, any pointers would be welcome!</p>

<pre><code>&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Javascript test &lt;/title&gt;
&lt;/head&gt;

&lt;body&gt;

&lt;p id="hey"&gt;Hey?&lt;/p&gt;
&lt;p id ="nothing"&gt;Nothing&lt;/p&gt;
&lt;INPUT type =button VALUE="Button?" OnClick=(take())&gt;

&lt;script&gt;
function take(){
var hey=document.getElementById("hey");
var nothing =document.getElementById("one");

nothing.appendChild(document.createTextNode("You say hi, I say " + hey));
}
&lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>Alright, thanks for all the help guys. No one in particular was 100% right but i tried a combination of all the suggestions and got about 99% of the way to where i wanted to go. My code looks like this now. The last change im trying to make is not to append new text strings but to replace the old string with the string that is currently being appended.</p>

<pre><code>&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Javascript test &lt;/title&gt;
&lt;/head&gt;

&lt;body&gt;

&lt;p id="hey"&gt;Hey?&lt;/p&gt;
&lt;p id ="nothing"&gt;Nothing&lt;/p&gt;
&lt;input type ="button" value="Button?" OnClick="take();"/&gt;

&lt;script&gt;
function take(){
var hey=document.getElementById("hey");
var nothing =document.getElementById("nothing");

nothing.appendChild(document.createTextNode("You say hi, I say " + hey.innerHTML));

}

&lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>I appreciate the help, thank you Stack Overflow community!</p>
