DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   ASP (http://www.daniweb.com/forums/forum62.html)
-   -   problem in passing multiple checkbox values (http://www.daniweb.com/forums/thread45320.html)

spidey May 12th, 2006 7:53 am
problem in passing multiple checkbox values
 
hi,

i have a problem in passing multiple checkbox values.

the page displays records (pending invoices). each record has a checkbox on the last column. the user must check the boxes of the records he/she wishes to update.
[html]
<table>
<tr>
<td>label1</td>
<td>label2</td>
<td>label3</td>
</tr>
<%do while rs.eof%>
<tr>
<td>nth record's field1</td>
<td>nth record's field2</td>
<td>input type='checkbox' value='nth record's field3 (variable to be passed'></td>
</tr>
<%rs.movenext
loop%>
</table>
[/html]
below the table is an update button. if the user clicks it, the variables will be passed into a popup. the user will choose whether to put the records in the group of printed or cancelled ones.

i cud not fix the error on the page:sad:. i hope u cud help me solve this problem. i've been working on it for some time now.

thank u in advance. more power to u & to daniweb.

francis

campkev May 12th, 2006 11:02 am
Re: problem in passing multiple checkbox values
 
Quote:

i cud not fix the error on the page
what error?

msaqib May 12th, 2006 4:42 pm
Re: problem in passing multiple checkbox values
 
Quote:

<table>
<tr>
<td>label1</td>
<td>label2</td>
<td>label3</td>
</tr>
<%do while rs.eof%>
<tr>
<td>nth record's field1</td>
<td>nth record's field2</td>
<td>input type='checkbox' value='nth record's field3 (variable to be passed'></td>
</tr>
<%rs.movenext
loop%>

</table>
You must put the CheckBoxes in a Form and must provide the same name to all the check boxes. Then on the next page you will have the collection of checkboxex which were checked. Your code on the next page will be
For each CheckedItem in Request.Form("checkBoxName")
'do what ever u want
next


All times are GMT -4. The time now is 1:31 am.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC