title: How to call a JavaScript function onchange of a select tag?
body: <p>Below is my JavaScript:</p>
  
  <pre><code>&lt;script language="JavaScript"&gt;
  function checkit()
  {  
  var state=document.frm.getElementById(stateS)
  if (state="Please select a state")
      {
      document.frm.Month.disable = true;
      }
  else
      {
      document.frm.Month.enable = true;
      }   
  }&lt;/script&gt;
  </code></pre>
  
  <p>and I call <code>checkit()</code> function in it from below <code>&lt;select&gt;</code> tag:</p>
  
  <pre><code>&lt;td align="left"&gt;&lt;g:select name="Month" from="${month.values()}" optionValue="${Month}" onChange=checkit()/&gt;&lt;/td&gt;
   &lt;/tr&gt; 
  </code></pre>
  
  <p>I have a select tag for state and until I select any state the month select box should be disabled. Can anyone tell me where I went wrong?</p>