title: Javascript onchange select not working
body: <p>I'm trying to create an onchange event using javascript on a select element. But its not working, any hint what I'm doing wrong?</p>
  
  <p>Script.. </p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  function check() {
     alert("Hi");
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>HTML..</p>
  
  <pre><code>&lt;body&gt; 
  &lt;select name="selTitle" id="titles" onchange="check();"&gt;
  &lt;option value="Mr."&gt;Mr.&lt;/option&gt;
  &lt;option value="Ms."&gt;Ms.&lt;/option&gt;
  &lt;/select&gt;
  &lt;/body&gt;
  </code></pre>
  
  <p>Demo - <a href="http://jsfiddle.net/jq9UA/1/" rel="nofollow">http://jsfiddle.net/jq9UA/1/</a></p>