title: Trouble calling functions with onClick and radio buttons
body: <p>I'm trying to call a function when a radio button is clicked and I'm not sure why it won't work.</p>
  
  <p>This works:</p>
  
  <pre><code>&lt;input type="radio" onClick="alert();" /&gt;
  </code></pre>
  
  <p>But this for some reason does not:</p>
  
  <pre><code>&lt;input type="radio" onClick="myFunction();" /&gt;
  
  &lt;script language="javascript"&gt;
  function myFunction(){
      alert();
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>Any help is much appreciated.</p>