title: Checked all CheckBox of a Jsp page
body: <p>I am using Struts1.3, and in this Jsp page dynamically generate check boxes depends on the data available in Database. my code which is generate check boxes is as follow</p>
  
  <pre><code>&lt;table width="850" border="0" align="left" cellpadding="2" cellspacing="0"&gt;
     &lt;tr&gt;
      &lt;td width="100" align="center" bgcolor="#F3F3F3"&gt;&lt;label&gt;
      &lt;html:checkbox name="ExporterForm" value="&lt;%=authlist.get(i).getAuthorityid()%&gt;" property="exportauthority" styleId="checkbox99"  /&gt;
      &lt;/label&gt;&lt;/td&gt;
      &lt;td align="center" class="text_exp" &gt;&lt;%=authlist.get(i).getAuthorityname()%&gt;&lt;/td&gt;
     &lt;/tr&gt;
   &lt;/table&gt;
  </code></pre>
  
  <p>I have one more check Box(<code>selectAll</code>), and query is, I want to mark checked all while selection of selectAll CheckBox.</p>
  
  <p>and my code is for checked all check box is given below but it's select only one and need to select all please show me the path to achieve it.</p>
  
  <pre><code>function selectAllAuthorites()
  {
   var selectAll=document.getElementById("checkbox101")
   if(selectAll.checked==true)
   {
       document.getElementById("checkbox99").checked=true;
   }
  }
  </code></pre>