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

Using Textarea tag in CF

Status
Not open for further replies.

bboehle

Programmer
Aug 22, 2000
24
US
I have a page set up where a person enters news for the site, that enters in to a database then is displayed on another page. Currently I have it set up as a Textarea that uses insert to put it in to an access 2000 database. The field in access is set up as memo to allow for a large amount of characters. However if they enter news as multiple paragraphs using the enter key to seperate the paragraphs when it is displayed it all runs together as one paragraph. How can I get it to save and use the formatting?

Thanks!
 
I don't know if this is the best way to do it but when you output the variable instead of:

#Trim(YourTable.TextField)# or whatever

Do this instead:

#Replace(Trim(YourTable.TextField),Chr(10),&quot;<br>&quot;,&quot;ALL&quot;)#

This has worked great for me the few times I've needed it. Andrew
 
Or try setting the textarea wrap=hard, and use <pre> tags around the output. This will work with less coding.

Later
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top