title: Call servlet from select onchange and pass value
body: <p>I'm trying to call my servlet GET method and pass value from html <code>select</code> by using <code>onChange</code>. So far I have something like this.</p>
  
  <pre><code>&lt;form name="form1" action="http://localhost:8080/MainServlet/main" method="GET"&gt;
  &lt;input type=hidden name="action" value="checking"&gt;
  &lt;div class="select123" onchange="javascript:document.form1.submit();"&gt;
  &lt;select&gt;
      &lt;option selected="" value=""&gt;&lt;/option&gt;
      &lt;option value=""&gt;1&lt;/option&gt;
      &lt;option value=""&gt;2&lt;/option&gt;
      &lt;option value=""&gt;3&lt;/option&gt;
      &lt;option value=""&gt;4&lt;/option&gt;
  &lt;/select&gt;
  &lt;/div&gt;
  &lt;br&gt;&lt;br&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>I am able to access servlet but when I try to read my <code>select123</code> value, it is null.
  How can I correct it?</p>