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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

format a textarea filled in by CF var 1

Status
Not open for further replies.

dv8er88

Programmer
Feb 21, 2005
42
US
What I would like to do seems that it sould be simple.
I want to pass a variable to a text area and have it show the breaks.

1. I set the var
<cfset output_text = "Price " & #price# & "<br>" "Shipping " & #shipping#>

Now if I <cfoutput>#output_text#</cfoutput>
it looks great.

But if I try to output it in a textarea the breaks show as <br> in the text area.

<cfoutput><textarea rows=4,cols=80>#output_text#</textarea></cfoutput>
 
Try using the ASCII value for a carriage return or line feed,
<cfset output_text = "Price " & #price# &
"#CHR(13)#Shipping " & #shipping#>

13 is a carriage return 10 is a line feed.

Kenneth
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top