How to retrieve msg which is entered in textarea?

Results 1 to 5 of 5

Thread: How to retrieve msg which is entered in textarea?

  1. #1
    Marie Guest

    Default How to retrieve msg which is entered in textarea?

    In textarea, the msgs are with "enter" key. For example,<BR>"<BR> This is a test!<BR> 123<BR> 567<BR>"<BR><BR>But after using request.form, the result is <BR>This is a test! 123 567<BR><BR>It became a sentence instead of the format with enter keys.

  2. #2
    wundurgurl Guest

    Default RE: How to retrieve msg which is entered in textarea?

    The easy way is to put &#060;pre>&#060;/pre> tags around it.<BR><BR>Otherwise you have to replace carriage return (chr(13)) with a &#060;P>. How you do that would depend on what kind of programming you were using.

  3. #3
    Join Date
    Dec 1969
    Posts
    168

    Default RE: How to retrieve msg which is entered in textarea?

    Here is a code snipet I used to accompish this:<BR>&#060;% Function FormatStr(String)<BR> on Error resume next<BR> String = Replace(String, CHR(13), "")<BR> String = Replace(String, CHR(10) & CHR(10), "&#060;/P>&#060;P>")<BR> String = Replace(String, CHR(10), "<BR>")<BR> FormatStr = String<BR>End Function &#037;&#062;<BR><BR>then:<BR>&#060;%=formatStr(rs. Fields("Access_Memo_Field"))&#037;&#062;

  4. #4
    Isabelle Guest

    Default RE: How to retrieve msg which is entered in textarea?

    hi, <BR>I was tackling the same problem,<BR>this works, but then I have to give 2 hard returns in my textarea!<BR>Are you srue this is the function you use? <BR>chr(13) chr(10) & chr(10) chr(10)?<BR>


  5. #5
    Join Date
    Dec 1969
    Posts
    168

    Default Correction to Code snippet

    Seems when I posted to this forum.. that it took out my HTML BR tag.... the code below should work for you .. but you will need to change the [BR] to the proper HTML BR tag &#060; BR >...<BR><BR>&#060;% Function FormatStr(String)<BR>on Error resume next<BR>String = Replace(String, CHR(13), "")<BR>String = Replace(String, CHR(10) & CHR(10), "&#060;/P>&#060;P>")<BR>String = Replace(String, CHR(10), "[BR]")<BR>FormatStr = String<BR>End Function &#037;&#062;<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
  •