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

Table Formatting Question

Status
Not open for further replies.

rhnewfie

Programmer
Jun 14, 2001
267
CA
I have a page that uses a textarea to submit a comment. Once submitted the comment is redisplayed in the textarea as well as in a table above it. The problem is this:

The textarea keeps the paragraph formatting but the <TD> in the table does not. Any ideas?
 
Probably because HTML treats all whitespace as a single "space" so all of the tabs and carriageReturn/LineFeed characters are condensed into one space.

You might get a better answer in the HTML forum: forum215
 
Hi

The line breaks in the text area are carriage returns (vbcrlf) and these do not appear when shown in the HTML. What you need to do is replace the vbcrlf's with <br/>s to keep the formatting in the table cell. e.g.

<td><% Response.Write Replace(strText,vbcrlf,"<br/>")%></td>

Hope this helps

Nick (Webmaster)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top