carriage returns inside textarea

Results 1 to 2 of 2

Thread: carriage returns inside textarea

  1. #1
    Join Date
    Dec 1969

    Default carriage returns inside textarea

    I&#039;m saving input from a textarea in my access database (replacing carriage returns with <BR>) and displaying it on an HTML page - all good.<BR><BR>when I try to bring the content of that DB field into a textarea, the carriage returns and up as <BR> (htmlencode or not)<BR><BR>how do I create carriage returns in a textarea?

  2. #2
    Join Date
    Dec 1969

    Default Convert the <BR/>'s back!

    But the smarter thing to do is *NOT* convert the text before you put it in the DB.<BR><BR>Then you only convert it, on output, if it is *NOT* going to a &#060;TEXTAREA&#062;, in which case you do Replace(txt,vbLF,"&#060;br/&#062;"). You leave it alone if it&#039;s going back into a text area.<BR><BR>p.s.: To make a &lt;BR&#062; show in this forum, the easy way is to write &#060;br/&#062;.<BR><BR>But ultimately it is your choice.<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