| | |
Get values
Please support our ColdFusion advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Nov 2007
Posts: 34
Reputation:
Solved Threads: 0
I have form.mydata coming to my action page with comma delimeter value:
adam,joe,ben,steve,jill,andy,david
I want to seperate them and it works inside this loop:
How do I get them to print outside of loop?
This didnt work because it only printed the first value only and not all of them:
adam,joe,ben,steve,jill,andy,david
I want to seperate them and it works inside this loop:
ColdFusion Syntax (Toggle Plain Text)
<cfset myd = ""> <cfloop list="form.mydata" index="i" delimiters=","> <cfoutput> <cfset myd = "#i#"> #myd#<br /> </cfoutput> </cfloop>
How do I get them to print outside of loop?
This didnt work because it only printed the first value only and not all of them:
ColdFusion Syntax (Toggle Plain Text)
<cfset myd = ""> <cfloop list="form.mydata" index="i" delimiters=","> <cfoutput> <cfset myd = "#i#"> </cfoutput> </cfloop> <cfoutput> #myd#<br /> </cfoutput>
When you use a variable in the list element of the CFLOOP tag, it must be enclosed in #'s...
Otherwise, it interprets it as a literal value.
ColdFusion Syntax (Toggle Plain Text)
<cfset myd = ""> <cfloop list="#form.mydata#" index="i" delimiters=","> <cfoutput> <cfset myd = "#i#"> #myd#<br /> </cfoutput> </cfloop>
Otherwise, it interprets it as a literal value.
Last edited by cmhampton; Jun 27th, 2008 at 7:53 pm.
![]() |
Similar Threads
- passing values of Select box from JSP to Action class thru form Bean (JSP)
- ASCII values and characters (C)
- Values are getting lost! (C++)
- help with polymorphism and inheritance...getting null values (Java)
- The improtance of replacing values in pointers (C)
- can't set paging file values (Windows NT / 2000 / XP)
- Posting values to a payment gateway without using a form (ASP.NET)
- checkbox values (JSP)
Other Threads in the ColdFusion Forum
- Previous Thread: Coldfusion Sticky/Stay-Filled forms
- Next Thread: title tag
Views: 1368 | Replies: 1
| Thread Tools | Search this Thread |
Tag cloud for ColdFusion





