Results 1 to 2 of 2
Thread: html <textarea> problem
- 01-17-2010, 02:59 PM #1
Member
- Join Date
- Feb 2009
- Posts
- 57
- Rep Power
- 0
html <textarea> problem
<textarea wrap="virtual" name="activity_description" rows="7" cols="70"></textarea>
for example I entered this message in my text area:
"The quick.
Brown fox.
jump"
then i saved it to my database.. when i query and display it back the result would look like this:
"The quick. Brown fox. jump"
it doesn't retain the way the user entered the message, how do i fix this?
my PostgreSQL db column is set to recieve "character varying" and i do "INSERT INTO activity_info (activity_description)
VALUES (?);
stmt.setString(1, bean.getActivity_description());
i'm using java program so this problem is related to java :) and i think it's how my java program handles the message that needs to be fixed.Last edited by anthrax; 01-17-2010 at 03:03 PM.
- 01-17-2010, 04:40 PM #2
Member
- Join Date
- Dec 2009
- Location
- Germany
- Posts
- 43
- Rep Power
- 0
The text in your textarea are plain text and no html, so you must convert linebreaks.
As example :
"\n" -> "<br/>"
Bye
Johannes
Similar Threads
-
Problem in reading HTML input field while uploading file
By sudipanand in forum Java ServletReplies: 1Last Post: 11-27-2008, 10:26 AM -
How can I include a html file in html textarea?
By surya_dks in forum New To JavaReplies: 2Last Post: 10-04-2008, 08:20 AM -
Problem with applying Sql order by to html table
By sireesha264 in forum Advanced JavaReplies: 2Last Post: 02-04-2008, 11:20 AM -
TextArea additable and uneditable (copy/past problem)
By qwerty55 in forum Advanced JavaReplies: 0Last Post: 01-20-2008, 12:41 AM -
Problem with '/' character in HTML and JSP
By Marcus in forum JavaServer Pages (JSP) and JSTLReplies: 2Last Post: 07-04-2007, 06:32 AM
Bookmarks