954,574 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

to insert multiple checkbox values

Hi

I have number of checkboxex on my page.I want to insert all the check box values and some associated values for the checkbox selected by user.

<%
		Categories cat = new Categories();
      	Vector<String[]> v = new Vector<String[]>();
      	String[] data;
      	v = cat.getPermissions();
      	Iterator<String[]> i = v.iterator();
      	while(i.hasNext()){ 
      		data = i.next();
      %>
   
   	 <tr class="text">
      <td>
      <input type="text" name="admin_id" id="admin_id" value="<%= data[0] %>" /> 
      <input type="hidden" name="role" id="role" value="<%= data[4] %>" />
     
      <input type="checkbox" name="chkbox" id="chkbox" value="<%= data[0] %>" />
  
      
    </td>
      
      <td><%= data[1] %></td>
      <td><%= data[4] %></td><%}%>


the vector will populate data from database and diplay on page...now whtever checkbox user selects i want to pass its value as 1 and admin_id and cat_id corresponding to tht in mysql table

Please can anyone tell...how it can be acheived?

tiksg2000
Newbie Poster
1 post since Oct 2010
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You