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

How to put CR in text field

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
0
0
I have a newbie question:
I am trying to create a database text field that contains several lines that should wrap to the next line when printed. My code is:
<CFSET details = &quot;line 1&quot;>
<CFSET details = details & &quot;line 2&quot;>
<CFSET details = details & &quot;line 3&quot;>

But obviously, the 3 lines run together. Can someone help?

Thanks.
 
You can try this

<CFSET details = &quot;line 1&quot;>
<CFSET details = details & &quot;<BR>&quot; & &quot;line 2&quot;>
<CFSET details = details & &quot;<BR>&quot; & &quot;line 3&quot;>

This will be stored in the database column as :

line 1<BR>line 2<BR>line 3

and when you try to display it through CFOUTPUT,it will be displayed as :

line 1
line 2
line 3

:)

Perichazhi

[sig][/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top