wood burning stoves*
The moose likes HTML, CSS and JavaScript and the fly likes Retaining text area input text format Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Retaining text area input text format" Watch "Retaining text area input text format" New topic
Author

Retaining text area input text format

Ragupathirajan Venkatesan
Ranch Hand

Joined: Aug 18, 2010
Posts: 62
Dear All,

I have one jsp form which has text area element, if enters the numbers 1 2 3 4 in vertical (means new line). I want to maintain the same format what ever i am entering in request form to the confirmation form(next page). Is there way in java script to achive this. Please suggest. Thanks in advance.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60785
    
  65

Why do you think that JavaScript needs to get involved?

Just format the markup correctly with newlines in the correct places.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Ragupathirajan Venkatesan
Ranch Hand

Joined: Aug 18, 2010
Posts: 62
hi

Thanks for the reply. But I passed the values to escape & unscape functions respectively in java script which made spaces and newlines properly and i used in next page for display. I got this from one of my friend. No extra work is done
 
 
subject: Retaining text area input text format
 
Similar Threads
cursor position
adding new lines to TextArea form value
Creating Bold text in a non-html viewer
Text editor in web page.
formatting the textarea form field in a servlet