Getting textarea o/p into a text file

Results 1 to 3 of 3

Thread: Getting textarea o/p into a text file

  1. #1
    Rupali Guest

    Default Getting textarea o/p into a text file

    I have a textarea where i accept a message. the user types in different lines.The data as submitted goes in the database.I have to retrieve it from the database.So,when I say &#039response.write "rs.fields("message")" &#039 .It gives the o/p in a straight line(without break).I want it as it was written in the textarea.i.e on different lines.what should I do?Should I get the o/p in a text file and then &#039readline &#039 it ?<BR><BR>Please help.<BR>

  2. #2
    Join Date
    Dec 1969
    Posts
    168

    Default RE: Getting textarea o/p into a text file

    &#060;%<BR>Function FormatStr(String)<BR><BR>on Error resume next<BR>String = Replace(String, """", "&quot;")<BR>&#039uncomment the 4 lines below if you wish to exclude html from msg<BR>&#039String = Replace(String, "&#060;", "&lt;")<BR>&#039String = Replace(String, "&#062;", "&gt;")<BR>&#039String = Replace(String, "/&lt;", "&#060;")<BR>&#039String = Replace(String, "/&gt;", "&#062;")<BR>String = Replace(String, CHR(13), "")<BR>String = Replace(String, CHR(10) & CHR(10), "&#060;/P&#062;&#060;P&#062;")<BR>&#039take the extra spaces out of the next line (around the BR tag)<BR>String = Replace(String, CHR(10), "&#060; BR &#062;")<BR>FormatStr = String<BR><BR>End Function<BR>%&#062;<BR>&#060;%=formatStr(rs.Fields ("message"))%&#062;<BR><BR>Hope this helps... Cheers!

  3. #3
    Rupali Guest

    Default Thanks

    Thanks Desiree!<BR> The thing worked fine.<BR>bye

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •