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

Need help with outputing memo field! any help appreciated 1

Status
Not open for further replies.

leadman

Programmer
Jun 11, 2001
177
US
Hi all,

Thanks to help I received here I almost have my memo field outputing correctly. Here is where I'm stuck:

When i retrieve the memo field "memLetter", I'm using the following code to remove the double quotes that are added by the textfield and to show repeating spaces (these work just fine):

*********************code begin*************************
Code:
<cfset noquotes=#replace(memLetter,&quot;#chr(34)#&quot;,&quot;&quot;,&quot;all&quot;)#>
<cfset noquotesandreturns=#replace(noquotes,&quot;#chr(10)#&quot;,&quot;<BR>&quot;,&quot;all&quot;)#>
#replace(noquotesandreturns,&quot;#chr(32)#&quot;,&quot; &quot;,&quot;all&quot;)#
*********************code end**************************

The output retains all spacebar presses and the quotes are gone and hard returns are retained BUT long sentences that wrap inside the textarea box don't wrap on the page - they actually push the table cell they occupy to become much wider than the screen! What is it about the above code that is causing this? I'm assuming it has to do with the above code since a straight output of a long memo field obeys the normal rules of textwrap on the viewed page.

Thanks in advance for any insight and thanks to those who got me this far.
 
The only thing I've noticed is that you're changing chr(10) to <BR>. If the users hit CR in a text area, the value contains CRLF at that point, i.e. chr(13)chr(10).

It may help if you change all &quot;#chr(13)chr(10)#&quot; to &quot;<br>&quot;.
 
What is the code that you you are using to retain all space bar presses? - tleish
 
I'll try that phicha - thanks

tleish - i using #replace(noquotesandreturns,&quot;#chr(32)#&quot;,&quot;& n b s p ;&quot;,&quot;all&quot;)#

except without the spaces for the replacment (it actually turned into a space when i posted :) )
 
That's why it's stretching the table. If you take that out, then it will wrap. If you want to keep spaces that are more than one, then replace 2 spaces with 2 nobreakspace, that way it will leave the single spaces alone and your text should wrap. - tleish
 
uh - would that look like this?:

i using #replace(noquotesandreturns,&quot;#chr(32)##chr(32)#&quot;,&quot;& n b s p ;& n b s p ;&quot;,&quot;all&quot;)#



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top