Skip to main content
Participant
August 5, 2009
Question

How can I replace enter keys with?

  • August 5, 2009
  • 1 reply
  • 615 views

I have a text area on a page and need to save to a database and then output
the information exactly as it appeared on the text area. How can I replace enter keys with?
How do i do this, could anyone send me the code as got to get this up. I don't understand, help!
Kindest Regards

http://images.itags.org/userspace/1/200908011159520457.gifhttp://images.itags.org/userspace/1/200908011159520457.gifhttp://images.itags.org/userspace/1/200908011159520457.gif

    This topic has been closed for replies.

    1 reply

    Inspiring
    August 5, 2009

    Hi,

    Try to replace all the enter key occurences with "<br>" tag and then update it in your database.

    You can try something like,

    <cfset textVal = #replace(form.your_text_area_name,Chr(13),"<br>", "all")#>

    HTH

    Inspiring
    August 5, 2009

    You get more flexibility if you store what you receive and use the replace function when displaying on a web page.