Current location: Hot Scripts Forums » Programming Languages » ASP » Checkboxes array


Checkboxes array

Reply
  #1 (permalink)  
Old 10-19-06, 01:14 AM
cancer10 cancer10 is offline
Wannabe Coder
 
Join Date: Oct 2006
Location: India
Posts: 154
Thanks: 0
Thanked 0 Times in 0 Posts
Question Checkboxes array

I have the following table in page1.asp

Code:
<table>
<tr>
<td><input type="checkbox" name=chk value=1></td>
</tr>

<tr>
<td><input type="checkbox" name=chk value=2></td>
</tr>


<tr>
<td><input type="checkbox" name=chk value=3></td>
</tr>

</table>

If I want to retrieve the value of all the checkboxes which I have selected in page1.asp and display them in another page, page2.asp then I write the code as below

Code:
for each cid in request.Form("chk")
response.Write cid 
next

Now if I select 2 checkboxes (2 and 3) then the result will show like 23


but I want them in seperate variables, how can I?


Thanx for your help
Reply With Quote
  #2 (permalink)  
Old 10-19-06, 08:27 AM
koncept
Guest
 
Posts: n/a
your code is already there
Code:
for each cid in request.Form("chk")
response.Write cid  & ","
next
Reply With Quote
  #3 (permalink)  
Old 11-02-06, 02:48 PM
mws mws is offline
Newbie Coder
 
Join Date: Nov 2006
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
still need help?
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' Dr. Forensics PHP 3 07-15-06 03:54 PM
Setting array from checkboxes wsdcmke PHP 6 01-06-06 04:49 PM
Serializing a set of arrays dannyallen PHP 2 10-11-04 03:04 AM
linking to iframe not working :( j0d JavaScript 5 01-19-04 08:14 PM
asp: validating checkboxes in groups by groupid seala ASP 0 09-08-03 01:36 PM


All times are GMT -5. The time now is 03:53 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.