How about something more like this:

<cfset REQUEST.lf = chr(13) & chr(10) />
<cfoutput>
<html>
<head>
<title>Test</title>
</head>
<body>
</cfoutput>
<cfif StructIsEmpty(FORM)>
<cfoutput>
<form name="testFrm" enctype="application/x-www-form-urlencoded" 
method="post">
<textarea name="testFld" rows="10" cols="40"></textarea>
<input type="submit" />
</form>
</cfoutput>
<cfelse>
<cfset REQUEST.Arr = ListToArray(FORM.testFld,REQUEST.lf) />
<cfoutput>
<h3>#REQUEST.Arr[1]#</h3>
<ul>
</cfoutput>
<cfset ArrayDeleteAt(REQUEST.Arr,1) />
<cfloop array="#REQUEST.Arr#" index="REQUEST.i">
<cfoutput><li>#REQUEST.i#</li></cfoutput>
</cfloop>
<cfoutput>
</ul>
</cfoutput>
</cfif>
<cfoutput>
</body>
</html>
</cfoutput>

Steve 'Cutter' Blades
Adobe Certified Expert
Advanced Macromedia ColdFusion MX 7 Developer
____________
http://blog.cutterscrossing.com

"The best way to predict the future is to help create it"


On 12/29/2010 10:31 AM, Teed Younger wrote:
> Hi I have a text area which allows someone to enter text seperated by 
> delimiters. This text area is then passed to my action page which displays 
> each text in a list using the cfloop. Here is my cfloop code:
>
> <cfif SESSION.crossRefList NEQ "">
>            <h3>Cross References</h3>
>            <br />
>            <cfoutput>
>              <cfloop index="brandGroup" list="#FORM.crossRefList#" 
> delimiters="#chr(13)##chr(10)#">
>                <ul>
>                  <h3>#listFirst(brandGroup,"#chr(13)##chr(10)#")#</h3>
>                  <cfloop index="productGroup" 
> list="#listLast(productGroup,";")#" delimiters=";">
>                    <li>#listLast(productGroup,";")#</li>
>                  </cfloop>
>                </ul>
>              </cfloop>
>            </cfoutput>
>          </cfif>
>
>
> It works as far as seperating each list item into a new list tag, but the 
> heading 3 style is being applied to every singe list. Meaning I think its 
> displaying each text item only in the forst loop.
> Also, the delimiters I have specified dont seem to work properly, but this 
> may be resolved once the nested loops are resolved. The only delimiter that 
> seems to work as it is now is the carriage return that is defined in the 
> first loop. If I use the semi-colon as specified in the second loop, then any 
> items after the first item are all on the same line and have the semi-colon 
> itself IN the text.
>
> Hope all that made sense, and thanks for any help on this.
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:340305
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to