Adding a value from input to a div
<p>I have the below code that im trying to add the search results to a div by clicking on the result.  Let me know if anyone can assist, I looked at the code about a hundred times and can't seem to figure out why it wont work.  I have tried placing the javascript below the div, below the body, and in the head, no dice. Below is the PHP, javascript, and HTML.  Thanks.</p>

<p><strong>Javascript:</strong></p>

<pre><code>&lt;script type="text/javascript"&gt;
      var oButton = document.getElementById('addData');
      var data = document.getElementById('dataInput');
      var display = document.getElementById('display');

      oButton.onclick = function() {
         display.innerHTML += data.value + "&lt;br /&gt;";
      }
   &lt;/script&gt;
</code></pre>

<p><strong>PHP:</strong></p>

<pre><code>echo '&lt;button id="addData"&gt;','&lt;input id="dataInput" type="hidden" value="'.$results_row['username'].'" /&gt;','&lt;div id="testt"&gt;', '&lt;h3&gt;', $results_row['username'],'&lt;/h3&gt;','&lt;/div&gt;','&lt;/button&gt;';
</code></pre>

<p><strong>HTML:</strong></p>

<pre><code>&lt;div id ="search_results"&gt;&lt;/div&gt;
    &lt;p&gt;
                      &lt;div id="display"&gt;&lt;/div&gt; 

                    &lt;/p&gt;

    &lt;script type="text/javascript" src="jquery.js"&gt;&lt;/script&gt;
    &lt;script type="text/javascript" src="search.js"&gt;&lt;/script&gt;
</code></pre>
