Skip to main content
Participant
August 1, 2009
Question

How can I replace enter keys with?

  • August 1, 2009
  • 1 reply
  • 637 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,

appleappleapple

    This topic has been closed for replies.

    1 reply

    Dileep_NR
    Inspiring
    August 1, 2009

    Hi,,

    Please try this

    <cfif isdefined("form.btnsubmit")>
        <cfdump var="#form#">
        <cfoutput>
            #replace(form.comments,chr(13)& chr(10),"?","ALL")#
        </cfoutput>
    </cfif>
    <form action="index.cfm" method="post">
        <TEXTAREA Name="comments" rows="4" cols="20"></TEXTAREA>
        <input type="submit" name="btnsubmit" value="Relace">
    </form>

    Inspiring
    August 1, 2009

    You sure about that question mark in your replace function?  I was think a break tag myself.