<cfset Session.myString1='abcdefg'>
<cfset Session.myString2='abcdefg'>
<cfset Session.myString3='abcdefg'>
<cfoutput>
<textarea><cfloop from="1" to="3"
index="idx">#Session['myString#idx#']#<cfif idx neq
3>#chr(10)##chr(13)#</cfif</cfloop></textarea>
</cfoutput>
This works on CFMX. Note: Everything inside the cfoutputs should be on the
same line to avoid white space generated by CF.
What version of CF are you using? What OS?
-----Original Message-----
From: Stocke, Michael (M.J.) [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 30, 2003 12:15 PM
To: CF-Talk
Subject: Displaying line breaks in text area
Good afternoon group. I am new to this group, and although I have some
programming experience, I am new to Cold Fusion.
Here is my situation: I have a user enter information in a textarea in a
form. That text string is stored in a session variable and then displayed
later on anther page in another textarea field. Here is the relevant code:
<textarea name="resourcetools" cols="55" rows="6"
wrap="VIRTUAL"><CFLOOP from=1 to=6 index="strRowNum"><CFIF #Evaluate
("session.chk_Tools" & strRowNum)# IS NOT 0>#Evaluate ("session.chk_Tools" &
strRowNum)# -- </CFIF><CFIF #Evaluate ("session.str_ToolText" & strRowNum)#
IS NOT 0>#Evaluate ("session.str_ToolText" & strRowNum)#
& "<BR>"</CFIF></CFLOOP></textarea>
Unfortunately, instead of inserting a line break between my looped
variables, the <BR> tag is displayed as text. I have tried it with and
without quotes, and I have also tried using the character codes (chr(13) and
chr(10)), but the same thing happens. I have also tried using the
paragraphformat parameter, but I get an error, or a <P> tag gets printed to
the page. Can anyone tell me how to create line breaks in a textarea between
my looped variable values? Thanks.
Mike Stocke
Ford Retailer Education and Training
(313) 32 -23721
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at
http://www.coolfusion.com
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4