Solved

How can I format text?

Posted on 2004-08-01
2
177 Views
Last Modified: 2010-04-01
I have a form that has several fields in it.
One field is a textarea (VarChar) field, that the user can paste many lines of data into.
Then this form actions to a JSP that writes the record to a DB2 table.
Just like this question area for EE.

My problem is that when the user paste their data, and after it gets written to the DB2 table, I then display the record for a technician to work the request, when the technician views the record it all runs together.

How can I change my code to display the pasted data just like it was put in by the customer?
0
Comment
Question by:g118481
2 Comments
 
LVL 27

Accepted Solution

by:
rrz earned 150 total points
ID: 11687866
>then display the record for a technician to work the request, when the technician views the record it all runs together.          
Does the source code for the display page have the line breaks that the user entered in the textarea ?  If yes, then just use the HTML tags <pre>   </pre> .
If not, then try adding wrap attribute to textarea tag. Try something like  
<textarea  wrap="hard"  cols="yy"  rows="xx">
0
 
LVL 1

Author Comment

by:g118481
ID: 11687929
There are line breaks from the textarea form field.
However, the record display for the technician is not done using the textarea form field.
I am simply outputing it from a select query.

(i.e.   <%= REQTEXT %>)
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article describes my battle tested process for setting up delegation. I use this process anywhere that I need to setup delegation. In the article I will show how it applies to Active Directory
Giving access to ESXi shell console is always an issue for IT departments to other Teams, or Projects. We need to find a way so that teams can use ESXTOP for their POCs, or tests without giving them the access to ESXi host shell console with a root …
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question