Only 48 hours left in the trailboss' kickstarter!

New rewards and stretch goals. CLICK HERE!



  • Post Reply Bookmark Topic Watch Topic
  • New Topic

displaying long strings  RSS feed

 
christine lorraine
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi, i inputted a string in a text area where
i used <enter> to start new lines and then saved
it in the database. when i retrieved the string
from the database the format is retained when i
display it in a textarea but when i tried to
display it in an ordinary table the supposedly
next line of strings was displayed on the same line.
how do i go about this?
thanks.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This sounds like a HTML problem: the carriage return or line feeds are being ignored by the browser.
You can either wrap the table data contents in a presentation tag
<pre>present \n this \n\t data</pre>
or you can use a StringTokenizer to cut the end of line characters and swop them with a HTML break <br>
I hope I understood correctly...
Dave
 
christine lorraine
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
it worked! many thanks to you.
i preferred <pre></pre> tag because it
seemed to work faster than manipulating
the string using String Tokenizer.
thanks again
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!