title: Javascript function not firing from button click
body: <p>I have the following html:</p>
  
  <pre><code>    &lt;input type="text" id="theInput" /&gt;
  
  &lt;input id="clickMe" type="button" value="Search" onclick="testFunction(document.getElementById('theInput').value)" /&gt;&lt;br&gt;
  </code></pre>
  
  <p>I am trying to trigger this:</p>
  
  <pre><code>function testFunction(data)
  {
      alert(data);
  }
  </code></pre>
  
  <p>I also tried an alternative, using:</p>
  
  <pre><code>document.getElementById("clickMe").onclick = testFunction(document.getElementById("theInput").value);
  </code></pre>
  
  <p>Sadly, neither of these methods seem to get the function to trigger.  I'm sure I am missing something simple, could anyone point it out, please?</p>