title: Javascript onchange function executes onload but not onchange
body: <p>My onchange function for this form select is executing onload but not when changing the selection in the form. I've tried using both onload and onclick.</p>
  
  <p>I'm obviously only at the debugging implementation stage and will have it do other stuff once it works.</p>
  
  <p><strong>HTML:</strong></p>
  
  <pre><code>&lt;select case="sel1" name="Sort1" id="Sort1"&gt;
      &lt;option value="0"&gt;Fred&lt;/option&gt;
      &lt;option value="1"&gt;Ginger&lt;/option&gt;
      &lt;option value="2"&gt;Judy&lt;/option&gt;
      &lt;option value="3"&gt;Gene&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p><strong>JavaScript:</strong></p>
  
  <pre><code>window.onload = function() {
      document.getElementById('Sort1').onchange = ChgSort();
  }
  
  function ChgSort() {
      alert(document.getElementById('Sort1').value);
  }
  </code></pre>
  
  <p>When I load the page I get the alert popup with the current select value of 0. But when I click on the select field and change the option nothing happens.</p>
  
  <p>I'm sure, and hope, it's something silly and stupid and I've just been staring and debugging the same function too long...</p>
  
  <p>Help!</p>