[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

Formating reports retun as entered

Posted on 2010-03-31
7
Medium Priority
?
375 Views
Last Modified: 2012-05-09
When I populate an html field with text  now for example

    I hit enter 2 times you can see the white space

My report is as follows:
When I populate an html field with text  now for example I hit enter 2 times you can see the white space

I want my report to show the white space.  Di I need to run the field through some kind of JS or class.  I am generating the report from a jsp pulling from oracle.
0
Comment
Question by:gazdzid
  • 3
  • 3
7 Comments
 
LVL 28

Accepted Solution

by:
rrz earned 2000 total points
ID: 29295939
This is a HTML question, not a JSP question. The two things you need to use are
1) the wrap attribute in the textarea element  
2) the <pre> </pre> tags to display exactly what is sent to the browser.  

Please test the example below here in all browsers that you want to target.
<html>
<body>
Textarea test of wrap attribute
<form action="wrapTest.jsp">
<textarea name="ta" cols="20" rows="4" wrap="hard"></textarea>
<input type="submit" value="Submit">
</form>
</body>
</html>

-----------------------------------------------------
wrapTest.jsp
-----------------------------------------
<html>
<body>
Test !
<pre>
${param.ta}
</pre>
</body>
</html>

Open in new window

0
 
LVL 78

Expert Comment

by:slightwv (䄆 Netminder)
ID: 29333768
The PRE tag is the preferred way but if you cannot use it for some reason you can always do a string replace in the Oracle call to replace the CR/LF with <br/>
0
 
LVL 3

Author Comment

by:gazdzid
ID: 30870979
can you tell me the cause when using wrap within the tags as seen below gives a warning

" Iwak0043E Undifined attribute name (wrap)."

<textarea name="CONTACT_ADDR_DESCR" id="CONTACT_ADDR_DESCR" onchange="trim('CONTACT_ADDR_DESCR', this.value)" cols="70" rows="3" wrap="hard" onkeydown="limitText(this.form.CONTACT_ADDR_DESCR,this.form.countdown,2000);" onkeyup="limitText(this.form.CONTACT_ADDR_DESCR,this.form.countdown,2000);"  >Location Specific - Directions</textarea></td>
            </tr>
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
LVL 28

Expert Comment

by:rrz
ID: 30888115
Which browser are you using ?
The wrap attribute is not standard HTML.  Did you try leaving it out ?  
There might be a way to do it with CSS.  You could ask at  
http://www.experts-exchange.com/Developer/Web_Development/Web_Languages-Standards/CSS/
0
 
LVL 3

Author Comment

by:gazdzid
ID: 30890259
rrz@871311:
I did try leaving it out and added  <pre> to the report.  I received the same warning.  Then I duplicated the field outside of the <table> the warning went a way.  can I have pre inside of a table?
0
 
LVL 3

Author Closing Comment

by:gazdzid
ID: 31709727
Hey thanks it works!!
0
 
LVL 28

Expert Comment

by:rrz
ID: 30892337
>can I have pre inside of a table?  
Yes.  Thanks for the points.
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

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

From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
This article will show a step by step guide on how to mask column values in Oracle 12c using DBMS_REDACT full redaction option. This option is available on licensed Oracle Enterprise edition as part of Oracle's Advanced Security.
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
Suggested Courses

591 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