title: Get JavaScript calculated value to Struts action
body: <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;script type="text/javascript"&gt;
  
  function changeFunc() {
  var selectBox = document.getElementById("selectBox");
  var selectedValue = selectBox.options[selectBox.selectedIndex].value;
  alert(selectedValue);
  }
  
  &lt;/script&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
  &lt;select id="selectBox" onchange="changeFunc();"&gt;
  &lt;option value="1"&gt;Option #1&lt;/option&gt;
  &lt;option value="2"&gt;Option #2&lt;/option&gt;
  &lt;/select&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Can we get the selectedvalue back in the JSP as onChange parameter and pass it to form as a hidden variable and take it back to struts action ?</p>