RE: formatting in textarea
When you insert the value as is in a memo field it whould retain the carriage return.. If you show the value of the memo field in a textarea you should see the carriage return.. The replace solution is to show the value as text in html not in a textarea.. But carriage return are preserve as is when you insert the value in a text or memo field Pat -Original Message- From: Roberto Perez [mailto:[EMAIL PROTECTED] Sent: November 5, 2004 03:15 To: CF-Talk Subject: RE: formatting in textarea At 06:16 PM 11/6/04, Pat wrote: Just do this : cfset locCarriageReturn=chr(13) chr(10) cfoutput #replace(your_variable,locCarriageReturn,BR,ALL)# /cfoutput Thanks for the several solutions proposed. However, here's my doubt: if the text in the Memo field in Access is being stored without carriage returns, that means that whatever code or tags I use would have to be employed as data is *sent* to the database, so that carriage returns are included in that text. Can any of these solutions (e.g., locCarriageReturn, ParagraphFormat, etc.) be used *before* the data is stored (i.e., as data is sent), so that carriage returns are preserved? Thanks in advance, Roberto Perez [EMAIL PROTECTED] ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183570 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: formatting in textarea
One other imprtant thing I've run into when using replace for this purpose is this: When you display the memo field in an edit form, those br's show up. I usually use another replace() when outputting to an edit form. Something like: Replace(string,br, ,ALL) It seems to work well. THE GAME! ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183571 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: formatting in textarea
NO, don't modify the text before it goes into the database filling it with html tags. Leave it exactly as they typed it. Only format it with the replace() when displaying it in html. It will show up exactly as it was in a textarea. If you do it like you're saying, all of the text will run together when you display it in a textarea and all the carriage returns would be lost on the first update since all of your line breaks get replaced with a space. -Original Message- From: Will Tomlinson [mailto:[EMAIL PROTECTED] Sent: Sunday, November 07, 2004 9:21 AM To: CF-Talk Subject: Re: formatting in textarea One other imprtant thing I've run into when using replace for this purpose is this: When you display the memo field in an edit form, those br's show up. I usually use another replace() when outputting to an edit form. Something like: Replace(string,br, ,ALL) It seems to work well. THE GAME! ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183575 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: formatting in textarea
When you display the text, using ColdFusion, you need to replace the line feeds with br tags. There may be a custom tag or UDF that already does this since it is such a common issue. M!ke -Original Message- From: Roberto Perez [mailto:[EMAIL PROTECTED] Sent: Thursday, November 04, 2004 11:10 PM To: CF-Talk Subject: formatting in textarea Hi all, Quick question on textarea: I have a form with a box where visitors can type comments. The input goes to an Access database with a memo field. My problem is, if they type one or more carriage returns, the text in the memo field does not reflect that, and obviously when the comments are displayed on the browser they look like one long paragraph instead of several shorter ones (separated by carriage returns) as the visitor intended. Any solutions for this? Thanks in advance, Roberto Perez [EMAIL PROTECTED] ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183563 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: formatting in textarea
Just do this : cfset locCarriageReturn=chr(13) chr(10) cfoutput #replace(your_variable,locCarriageReturn,BR,ALL)# /cfoutput Pat -Original Message- From: Dawson, Michael [mailto:[EMAIL PROTECTED] Sent: November 6, 2004 18:02 To: CF-Talk Subject: RE: formatting in textarea When you display the text, using ColdFusion, you need to replace the line feeds with br tags. There may be a custom tag or UDF that already does this since it is such a common issue. M!ke -Original Message- From: Roberto Perez [mailto:[EMAIL PROTECTED] Sent: Thursday, November 04, 2004 11:10 PM To: CF-Talk Subject: formatting in textarea Hi all, Quick question on textarea: I have a form with a box where visitors can type comments. The input goes to an Access database with a memo field. My problem is, if they type one or more carriage returns, the text in the memo field does not reflect that, and obviously when the comments are displayed on the browser they look like one long paragraph instead of several shorter ones (separated by carriage returns) as the visitor intended. Any solutions for this? Thanks in advance, Roberto Perez [EMAIL PROTECTED] ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183564 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
Re: formatting in textarea
Roberto Perez wrote: Hi all, Quick question on textarea: I have a form with a box where visitors can type comments. The input goes to an Access database with a memo field. My problem is, if they type one or more carriage returns, the text in the memo field does not reflect that, and obviously when the comments are displayed on the browser they look like one long paragraph instead of several shorter ones (separated by carriage returns) as the visitor intended. Any solutions for this? The ParagraphFormat() function might be what you're looking for. -- Keith Gaughan, Developer Digital Crew Ltd., Pembroke House, Pembroke Street, Cork, Ireland http://digital-crew.com/ ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183565 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: formatting in textarea
At 06:16 PM 11/6/04, Pat wrote: Just do this : cfset locCarriageReturn=chr(13) chr(10) cfoutput #replace(your_variable,locCarriageReturn,BR,ALL)# /cfoutput Thanks for the several solutions proposed. However, here's my doubt: if the text in the Memo field in Access is being stored without carriage returns, that means that whatever code or tags I use would have to be employed as data is *sent* to the database, so that carriage returns are included in that text. Can any of these solutions (e.g., locCarriageReturn, ParagraphFormat, etc.) be used *before* the data is stored (i.e., as data is sent), so that carriage returns are preserved? Thanks in advance, Roberto Perez [EMAIL PROTECTED] ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183566 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54
RE: formatting in textarea
I try not to use paragraphformat() too much. Users usually end up complaining that their single line breaks become doubles. I usually input the text from a textarea just as they entered and then format it on output with #replace(str, #chr(13)##chr(10)#, br, ALL)# -Original Message- From: Keith Gaughan [mailto:[EMAIL PROTECTED] Sent: Saturday, November 06, 2004 7:06 PM To: CF-Talk Subject: Re: formatting in textarea Roberto Perez wrote: Hi all, Quick question on textarea: I have a form with a box where visitors can type comments. The input goes to an Access database with a memo field. My problem is, if they type one or more carriage returns, the text in the memo field does not reflect that, and obviously when the comments are displayed on the browser they look like one long paragraph instead of several shorter ones (separated by carriage returns) as the visitor intended. Any solutions for this? The ParagraphFormat() function might be what you're looking for. -- Keith Gaughan, Developer Digital Crew Ltd., Pembroke House, Pembroke Street, Cork, Ireland http://digital-crew.com/ ~| Special thanks to the CF Community Suite Gold Sponsor - CFHosting.net http://www.cfhosting.net Message: http://www.houseoffusion.com/lists.cfm/link=i:4:183567 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations Support: http://www.houseoffusion.com/tiny.cfm/54