title: Accessing a form variable inside javascript
body: <p>I have a code like this</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;Title
  &lt;script&gt;
  function callme()
  { 
          alert("Hi");
                document.test.action ="testAction.do";
          alert(document.getElementById("option").value);     
          alert('&lt;%=request.getParameter("option")%&gt;'); 
  }
  &lt;/script&gt;           }
  &lt;/head&gt;
  &lt;body&gt;
  &lt;FORM method="post" name="test" &gt;
  &lt;select name="option" id="option"&gt;
  &lt;option&gt;1&lt;/option&gt;
  &lt;option&gt;2&lt;/option&gt;
  &lt;/select&gt;
  &lt;input type="submit" value="Submit" onClick="callme()"&gt;
  &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>This is a sample jsp code of what I have to do.The problem is I am able to get value for the document.getElementById but I want to access this parameter inside my action class which is retunring as null.Can anyone help me in solving this issue.</p>