786snow
Programmer
- Nov 12, 2006
- 75
Hi,
is it possible to send array of checkboxes to java sevlet.
In my HTML I do the following
***********
<TR>
<td><INPUT TYPE=checkbox NAME=check_all VALUE=Eh id="check_all[0]">
<b>Select all documents</b></td>
</TR>
<tr>
<td><div class="indent"><input type="checkbox" name="check_all" id="check_all[1]"
value="EZ"/ > Account statements </div></td>
</tr>
<tr>
<td><div class="indent"><input type="checkbox" name="check_all" id="check_all[2]"
value="EA"/ > Account statements </div></td>
</tr>
<tr>
<td><div class="indent"><input type="checkbox" name="check_all" id="check_all[3]"
value="EP"/ > Account statements </div></td>
</tr>
*************
Now when i submit and try to catch thhe values in my java sevlet, Like
String check_all = req.getParameter("check_all[0]");
I get null, like it is not recognizing an array, but if i do
String check_all = req.getParameter("check_all");
I get te value "Eh
is it possible to send array of checkboxes to java sevlet.
In my HTML I do the following
***********
<TR>
<td><INPUT TYPE=checkbox NAME=check_all VALUE=Eh id="check_all[0]">
<b>Select all documents</b></td>
</TR>
<tr>
<td><div class="indent"><input type="checkbox" name="check_all" id="check_all[1]"
value="EZ"/ > Account statements </div></td>
</tr>
<tr>
<td><div class="indent"><input type="checkbox" name="check_all" id="check_all[2]"
value="EA"/ > Account statements </div></td>
</tr>
<tr>
<td><div class="indent"><input type="checkbox" name="check_all" id="check_all[3]"
value="EP"/ > Account statements </div></td>
</tr>
*************
Now when i submit and try to catch thhe values in my java sevlet, Like
String check_all = req.getParameter("check_all[0]");
I get null, like it is not recognizing an array, but if i do
String check_all = req.getParameter("check_all");
I get te value "Eh