SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Zealot thespian's Avatar
    Join Date
    Sep 2000
    Location
    South Africa
    Posts
    186
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Reading Data from <TEXTAREA>


    I hope this question is posted in the correct forum. If not - please relocate it for me. Thanx.

    Question:

    I am creating a "Feedback" page on a web site using ASP. Once the form is submited, I am generating an email using the CDONTS object.

    My problem concerns the data captured (actual comments) in a <TEXTAREA> tag on the input form.

    When the visitor seperates this data (comment) into paragraphs with the carriage return for example, the resultant value from the Request(textarea_name) is unformated and the paragraphs all run into one another.

    Can this be resolved?

    Many Thanx
    Bill Conté [Protected by Psalm 91]
    Web Mechanix
    Growing OLD is Mandatory - Growing UP is Optional!

  2. #2
    Yugo full of anvils bronze trophy hillsy's Avatar
    Join Date
    May 2001
    Location
    :noitacoL
    Posts
    1,859
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try getting this put in the ASP/JSP/ColdFusion forum.

    I bet Jeremy W or dhtmlgod will have something to say about it
    that's me!
    Now A Pom. And a Plone Nut
    Broccoli Martinez Airpark

  3. #3
    SitePoint Wizard wdmny's Avatar
    Join Date
    Jul 2000
    Location
    Here
    Posts
    1,010
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It will be stored in the database, with carriage returns and all. It will even be outputted with them as well, you just can't see them since HTML does not consider a carriage return as a new line.

    What you need to do is in the page that returns the results, replace the carriage returns with <br>'s.

    Code:
    strComment = Replace(strComment, vbCrlf, "<br>" & vbCrlf)
    vbCrlf is the vbscript/vb equiv to a new line, or more specifically, Carriage Return Left.

  4. #4
    SitePoint Zealot thespian's Avatar
    Join Date
    Sep 2000
    Location
    South Africa
    Posts
    186
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanx Wes, that looks exactly like what I do need. I will try it out this evening when I get home.

    Hillsy - Thanx for that advice. Looks like I won't need it though. Wes has come to my rescue. btw. It was dhtmlgod who got me started with this whole thing!
    Bill Conté [Protected by Psalm 91]
    Web Mechanix
    Growing OLD is Mandatory - Growing UP is Optional!

  5. #5
    ALT.NET - because we need it silver trophybronze trophy dhtmlgod's Avatar
    Join Date
    Jul 2001
    Location
    Scotland
    Posts
    4,836
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Got you started with what?

    If your are sending HTML that will work, but if your sedning text, the <br> will appear. Just thought you might like to know.


  6. #6
    SitePoint Zealot thespian's Avatar
    Join Date
    Sep 2000
    Location
    South Africa
    Posts
    186
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I thought I saw you lurking there in the shadows. Nothing like using someone's name in vain to bring them out into the open!

    What I was talking about was that wonderful CDONTS thread/tutorial of yours. Also you have helped me via email when I started using these objects the first time.

    This specific case is a single HTML email that will be sent to the owner of the web site, so all's fine with that solution.

    Compliments of the Season to you all!
    Bill Conté [Protected by Psalm 91]
    Web Mechanix
    Growing OLD is Mandatory - Growing UP is Optional!


Bookmarks

Posting Permissions

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