Page 1 of 1

formatting question

Posted: Thu Jan 02, 2003 11:39 am
by soshea
hey,
i am utilizing a <textarea> tag to input data into a text type column in a DB. this is so that people can cut and paste documents. my problem is that when i utilize a
<pre>

Code: Select all

<?=$data[document]?>
</pre>
if they did not use a carriage return when typing or cutting and pasting, then the lines will continue to the right forever even when i utilize the width attribute for the pre tag. if i just have the data show up in another textarea tag for viewing it looks great!!!
any suggustions on how to format this so that it does not run on but actually wraps the text in the appropriate area???!?
thanx for any help
soshea

Posted: Thu Jan 02, 2003 12:06 pm
by uberpolak
Have you tried putting WRAP="virtual" in your <TEXTAREA> tag? I wasn't quite sure by your question but it sounded like that might help.

eg:

<TEXTAREA WRAP="virtual"></TEXTAREA>

Posted: Thu Jan 02, 2003 12:11 pm
by soshea
ahhh, good point. completely forgot about the virtual. will giver it a try!!
thanx
soshea

Posted: Fri Jan 03, 2003 3:14 pm
by soshea
just wanted to followup with what i utilized incase other people had the same problem.

i used the WRAP="hard". this made the formatting go from one long string (if the user did not create the returns them selves) to inserting the wrapping needed.

your suggestion kick started the process, thanx
soshea