SitePoint Sponsor |
|
User Tag List
Results 1 to 6 of 6
Thread: Reading Data from <TEXTAREA>
Hybrid View
-
Dec 16, 2001, 06:55 #1
- 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
-
Dec 16, 2001, 10:45 #2
- 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
-
Dec 16, 2001, 16:05 #3
- 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)
-
Dec 18, 2001, 06:26 #4
- 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!
-
Dec 18, 2001, 06:49 #5
- 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.
-
Dec 18, 2001, 08:08 #6
- 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!
Bookmarks