• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Confused...printing a description as entered by the user.

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Im using a text area in a html(in a jsp) form to get a discription and address from users.
<textarea name="Address" cols="21" rows="4" ></textarea></td>
Im writing this on a text file with other details in the form using java.
Then Im previewing those values by reading from that text file.
after the conformation of the user Im storing those values in the db (sql2k).
when I want to display the discription from the db it displays as a single line and its realy odd to see.

how can I preview a description as same as user entered .

I want to print the previewing page as well.Im reading the description to a String variable and Im just doing

<textarea name="textarea3" rows="5" readonly><%=varAddress%></textarea>
This is OK for the previewing part but I cant print this without the textarea border.

Pls help me on this.
Thanx in advance for any help.
Jil
 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In reference to this issue:
"when I want to display the discription from the db it displays as a single line and its realy odd to see."

I had to use the wrap attribute of "hard" to force line breaks at my column length. I believe this will include the line break in the String
<textarea name="additionalInfo" cols="65" rows="20" wrap="hard"> </textarea>
 
Jil Nautilus
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks a lot Brayan
It works.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic