The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Special Forums > Web Programming, Web 2.0 and Mashups
.
google unix.com



Web Programming, Web 2.0 and Mashups Discuss Web Programming and Web Server Administration, including LAMP, Apache, MySQL, Flash, HTML, SEO, Mashups and other Web APIs and topics.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to enter a newline after every XML tag end? DTechBuddy Shell Programming and Scripting 5 08-06-2009 02:13 AM
add newline in file after finding specific text jxh461 Shell Programming and Scripting 4 07-23-2009 01:31 AM
how to replace a text with a newline hegdeshashi UNIX for Dummies Questions & Answers 3 06-02-2009 08:49 AM
newline Gale Gorman Forum Support Area for Unregistered Users & Account Problems 2 05-04-2008 01:23 PM
Formatting a text file based on newline and delimiter characters ntekupal Shell Programming and Scripting 5 05-11-2007 04:33 PM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 09-12-2009
suresh_kb211 suresh_kb211 is offline
Registered User
  
 

Join Date: May 2009
Posts: 28
how to get newline in a text box

Hi,
plz ignore the error in subject. i need new line in text area.
I am designing a JSP in which i have to display a field taken from oracle DB table in a text area.. field is first selected from oracle thru C++ and passed to jsp in a variable as one long string. the problem is while inserting into the table, line-break/newline are replaced by | symbols and inserted. while getting back the value for display, i want newlines to be displayed instead of | symbols. i tried replacing | by \n in C and passed to jsp, but in the text area, its printing \n instead of new lines.

How to achieve this, experts plzzz advice..
actual string
Quote:
unix and linux|forums|mac HP sunOS | PHP JSP
formatted o/p
Quote:
unix and linux
forums
mac HP sunOS
PHP JSP

Last edited by suresh_kb211; 09-12-2009 at 08:42 AM..
  #2 (permalink)  
Old 09-12-2009
frank_rizzo frank_rizzo is offline Forum Advisor  
Resident BOFH
  
 

Join Date: Dec 2007
Posts: 427
can you use the <br /> tag or wrap it in <pre></pre>?
  #3 (permalink)  
Old 09-14-2009
suresh_kb211 suresh_kb211 is offline
Registered User
  
 

Join Date: May 2009
Posts: 28
the tags work in html area.. in text area, its printing everything as it is.. its printing
Quote:
suresh <br> hi<br> welcome <br>
as
Quote:
suresh <br> hi<br> welcome
<br>

and
Quote:
suresh
hi
welcome
as
.
the problem is i get the whole message as 1 complete string, if br or sum tag works, i can append it to the string that is passed from backend.
Reply

Bookmarks

Tags
newline, text area

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 05:39 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0