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

How to Insert a Line Break In a String Field

Status
Not open for further replies.

scripter73

Programmer
Joined
Apr 18, 2001
Messages
421
Location
US
Hi,

It sounds like this should be easy, but I haven't been very successful.

I have a session variable (session.memo) that's made up of other session variables as follows:

<CFSET #SESSION.MEMO# = &quot;#session.dbnote_name# #session.dbnote_phone# #session.dbnote_reportemail# #session.dbnote_insmail# #session.dbnote_newaddr# #session.dbnote_vehnoton# #session.dbnote_relationship# #session.dbnote_extracomments#&quot;>


SESSION.MEMO is supposed to emulate a memo text field. However, all of the text runs together and is hard to read. I'd like to change the format where I could add in a <BR> tag or some kind of line break between each session variable, but I don't know how to do it.

The only other alternative I can find is to create a session variables of 80 spaces and insert that between each variable.

Any ideas are greatly appreciated.

Thanks,
scripter73
 
Have you tried defining a Carriage Return and Linefeed variable and then inserting the variable?

<CFSET CrLf = &quot;#chr(13)#&quot;>

<CFSET #SESSION.MEMO# = &quot;#session.dbnote_name# #CrLf# #session.dbnote_phone# #CrLf#
#session.dbnote_reportemail# #CrLf#
#session.dbnote_insmail# #CrLf#
#session.dbnote_newaddr# #CrLf#
#session.dbnote_vehnoton# #CrLf#
#session.dbnote_relationship# #CrLf#
#session.dbnote_extracomments#&quot;>


Mitch Duszynski
Web Developer
Human Kinetics
PO Box 5076, Champaign, IL 61825
Tel: 217-351-5076 x2474 | Fax: 217-351-2674
mitchd@hkusa.com |
 
Hi MrSki,

I do think I forgot to tell you how your suggestion went and more importantly to thank you for it.

It worked great! Thanks again! and sorry for the belated thanks.

Take care,
scripter73
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top