Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form (check box) ..

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi guys,

I need help in a form which is checkbox form.
Actually I am using coldfusion too.

What i am doing is i am getting out a number of records on a search criteria and displaying it in a form output with a check box infront of each record.

the user will check the boxes to delete the record like in hotmail.
the value of checkbox stores the Id of the record and when users select multiple records the value is a string like below


if user selected record1,2,3
then
value is
id1,1d2,1d3

now my question is how do i access each of the id .
if i want to access 1d1 then 1d2 then 1d3
is there any way in HTMl or eve in coldfusion please instruct me.

Thanx in advance
GG



<Form action=&quot;asearchaction1.cfm&quot; method=&quot;post&quot;>

<tr>
<td>
<input name=&quot;idselect&quot; value=&quot;#asearch.id#&quot; type=checkbox> </td>
<td>#asearch.contact#</td>
<TD>#asearch.company#</TD>
<Td>#asearch.city#</TD>
<TD>#asearch.state#</TD>
<TD><a href=&quot;Detail.cfm?DetailCode=#asearch.id#&quot;>Detail</a> </td>
<TD><a href=&quot;delete.cfm?deletecode=#asearch.id#&quot;>Delete</a> </td>

</TR>
<input value=&quot;Submit &quot; type=submit>
<input value=&quot;Clear form&quot; type=reset>
</form>
 
Hi!

That's a normal list...
Loop on that list using CFLOOP and you will be able to access each of these ids.

<CFLOOP LIST=&quot;#idselect#&quot; INDEX=&quot;selectedID&quot;>
[tab] do whatever code you may need here using each ID.
</CFLOOP>

I hope you understand...
Chris
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top