Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How can I replace enter keys with?

New Here ,
Jul 31, 2009 Jul 31, 2009

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

586
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jul 31, 2009 Jul 31, 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>

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 01, 2009 Aug 01, 2009
LATEST

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources