how to retain formatting from textarea input

Results 1 to 2 of 2

Thread: how to retain formatting from textarea input

  1. #1
    Join Date
    Dec 1969

    Default how to retain formatting from textarea input

    I posted a message earlier, and got a response, however I&#039m not sure how to implement the suggestion that I was given. Here is what I am trying to do:<BR><BR>I have an ASP form page, and there is a textarea where people can freeform type whatever they please. When the form is submitted, it is written to an Access database. Later, certain people can access an ASP page which displays everything that was written (similar to a bulletin board type environment). The problem is, I can&#039t get the text to retain it&#039s formatting now that it is in HTML form...<BR><BR>Could someone let me know what I can do to fix this, and EXACTLY where to place any extra code, etc..<BR><BR>thanks in advance!

  2. #2
    Leungas Guest

    Default RE: how to retain formatting from textarea input

    What you need to have is a replace function over all the line feed characters, and to redisplay them when it get loaded... so I would try something like this...<BR><BR>before you send to Access add this line...<BR><BR>&#060;your variable&#062; = replace(&#060;your variable&#062;,chr(10)," **/**/") &#060; not that the silly looking thing is just a code in your ASP to keep track of when the lines end<BR><BR>In your HTML<BR>&#060;your variable&#062; = replace(&#060;your variable&#062;," **/**/","<BR>") &#060; now this will intepret as line breaks<BR><BR>Hope this help<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts