title: Struts2 page not returning correct value from checkbox
body: <p>I have a form with various pieces of phone information for two phones, including two checkboxes that correspond to a boolean value in my action class. The below javascript is setting the second check box automatically if the user enters two identical phone numbers. </p>
  
  <pre><code>if(phone1 != '' &amp;&amp; phone1==phone2)
  {
      document.getElementById("phone2Type").value = document.getElementById("phone1Type").value;
      document.getElementById("phone2Text").value = document.getElementById("phone1Text").value;
      document.getElementById("phone2Text").checked = document.getElementById("phone1Text").checked;
  
      if( phone2Type=='CELL' &amp;&amp; document.getElementById('phone2Text') != null)
      {       
          document.getElementById('phone2Text').disabled=true;
      }   
  
      document.getElementById("phone2Type").disabled=true;    
  }
  </code></pre>
  
  <p>And the jspx code to go along with it:</p>
  
  <pre><code>&lt;s:checkbox id="phone1Text"
      onclick="javascript:enableTextingBox()" cssClass="phoneText"
      name="phoneInfo.phone1.textOptionSelected" fieldValue="true"
      value="phoneInfo.phone1.textOptionSelected" 
      disabled="%{!phoneInfo.phone1.textOptionEnabled  || inputFieldDisabled}" /&gt;
  
  &lt;s:checkbox id="phone2Text"
      onclick="javascript:enableTextingBox()" cssClass="phoneText"
      name="phoneInfo.phone2.textOptionSelected" fieldValue="true"
      value="phoneInfo.phone2.textOptionSelected" 
      disabled="%{!phoneInfo.phone2.textOptionEnabled  || inputFieldDisabled}" /&gt;
  </code></pre>
  
  <p>The problem I'm seeing is that when I use javascript to set <code>phone2Text</code> equal to <code>phone1Text</code> the corresponding boolean (<code>phoneInfo.phone2.textOptionSelected</code>) is not getting set. I'm confused because the above jspx works correctly when I forget the javascript and check the box manually.</p>
  
  <p>Looking at the parameters being sent in the post method, instead I see this: </p>
  
  <p><code>_checkbox_phoneInfo.phone2.textOptionSelected: "true"</code></p>
  
  <p>What I would expect to see is:</p>
  
  <p><code>phoneInfo.phone2.textOptionSelected: "true"</code></p>
  
  <p>I'm not sure if this is a Struts2 issue or some javascript peculiarity that I'm not familiar with.</p>