| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| I dynamically generate textboxes, so they all have the same name. There are ten boxes in all. I know it outputs the checked boxes in a comma deliminted string, 1,2,3,4....etc. If checkbox 4 was one of the boxes selected, I need to do a cflocation to redirect to another. I was using cfif checkbox_id = "4" but that only works if that was the only box selected. If the other boxes were seleced in addition to box 4, the ciffi does not work, so what is the proper command to check if 4 is in the list ? For the life of me, I cannot remember and I know I have done it before. I know sql query is in (1,2,3....), but what is the cf command ? Thanks |
|
#2
| |||
| |||
| <cfset boxes="4,5,7"> <cfif listfind( boxes, "1" ) GT 0> found3 </cfif> |
|
#3
| |||
| |||
| Hi Fober1, thanks for the reply <cfset boxes="4,5,7"> <cfif listfind( boxes, "1" ) GT 0> found3 </cfif> Boxes contains the list of the values of the checkboxes that were checked, and listfind finds if the first checkbox, value 1 is in the list, which means it was checked. and GT 0 means that it was found/in the list ? |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.