[thelist] formatting for display only

Jonathan_A_McPherson at rl.gov Jonathan_A_McPherson at rl.gov
Tue Jul 2 10:38:01 CDT 2002


Why are you using <pre>?

When retrieving data that users have entered into <textarea/>'s, I generally
display it as-is, but replace the "soft" carriage returns with <br /> tags.
This preserves the paragraph structure the user created and allows the text
to flow naturally.


#Replace(MyQuery.MyField, Chr(13) & Chr(10), "<br />", "ALL")#

Jonathan McPherson, LMIT/SD&I
Software Engineer & Web Systems Analyst
email / jonathan_a_mcpherson at rl dot gov

-----Original Message-----
From: Rob Smith [mailto:rob.smith at thermon.com]
Sent: Tuesday, July 02, 2002 8:13 AM
To: Thelist (E-mail)
Subject: [thelist] formatting for display only

[ Picked text/plain from multipart/alternative ]
Hi guys and galls,

I have users entering text into a <textarea value="" cols="50" rows="20"
wrap="VIRTUAL"></textarea>. Their text can contain multiple soft and hard
carriage returns. This information is stored into a database cell.

When I go back to view this information using <pre></pre> tags I get:

     this is one long line of text. this is one long line of text. (keeps
going -->)

     this is another long line of text. this is another long line  (keeps
going -->)

I want it to look like actual paragraphs viewed at least at 800 pixels wide,
not 15 monitor lengths wide. Is there anything I can do differently, perhaps
in the <textarea/> tags, or methods of display (HTML).

I've tried these:
*Span tags
*Div tags

Maybe I'm just not using the right specifications in the div tags...


More information about the thelist mailing list