title: Calling javascript function from a select onChange
body: <p>So I have a simple HTML select box, and a javascript alert function. I want the select box to have an onchange event that will call the javascript alert function.
  This is what I have so far:</p>
  
  <p>HTML</p>
  
  <pre><code>&lt;div style="float: left"&gt;Type: &lt;select id="selector" onChange="jsfunction()"&gt;
    &lt;option value="Pyr"&gt;Pyramidally&lt;/option&gt;
    &lt;option value="Lin"&gt;In-Lines&lt;/option&gt;
    &lt;option value="Sym"&gt;Symmetrically&lt;/option&gt;
    &lt;option value="Nsym"&gt;Non-Symmetrically&lt;/option&gt;
  &lt;/select&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>Javascript</p>
  
  <pre><code>function jsfunction(){
      alert("hi");
  }
  </code></pre>
  
  <p>It doesn't work and for the life of me I can't figure out why. Most other questions of this nature I've found suggest <code>""</code> around calling the function - which I've got or making the <code>onChange</code> 'c' capital, which I also have. Any possible help? I'd be very grateful.</p>