SunQuest
           Java Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesJava Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
You eat, breathe and sleep innovation. Build your mobile intelligence with BlackBerry® experts this July. Register Today!
  #1  
Old April 9th, 2002, 02:21 PM
Iburford Iburford is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Posts: 2 Iburford User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
New Line!!

I am trying to pull a value (mediumtext) from the database and allow it to be edited. So far so good. I want to time and date stamp it. I am not having a lot of luck. The code below works, the values are retrieved and editable but I want to put in a line break (<P> or <BR>) between the <%= rs.getString("h_detail") %> and the <%= new java.util.Date() %>. Any clues? I am banging my head on the screen here !!!

<textarea NAME="h_detail" ROWS="5" COLS="80" WRAP="VIRTUAL"><%= rs.getString("h_detail") %>&nbsp;<%= new java.util.Date() %>&nbsp;&nbsp;</textarea>

Reply With Quote
  #2  
Old April 9th, 2002, 02:55 PM
pabloj's Avatar
pabloj pabloj is offline
Modding: Oracle MsSQL Firebird
Dev Shed God 6th Plane (7500 - 7999 posts)
 
Join Date: Jun 2001
Location: Outside US
Posts: 7,620 pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level)pabloj User rank is Captain (20000 - 30000 Reputation Level) 
Time spent in forums: 2 Months 2 Weeks 4 Days 2 h 52 m 26 sec
Reputation Power: 259
something like /n or /r (I'm not sure?)

Reply With Quote
  #3  
Old April 10th, 2002, 06:48 AM
oscagne oscagne is offline
Java Developer
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2001
Posts: 5 oscagne User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Almost...it's \n or \r. They do seperate functions, but amount to almost the same thing (UNIX reads them differently to windows - you'll see the control-M char if you transfer these to UNIX without converting - not that java cares, it'll ignore these) . All you need to know is that the HTML will look at them the same, so use both.

The <P> and <BR> won't work as they are inside the textarea. I don't do JSP(Sevlets instead), but I'd have thought that as with the HTML, if you put your tag on the next line then it'll format it to be on the next line.

An aside:
You can also declare them as a char which is quite odd but useful for String.indexOf() for example
i.e. char a ='\n'

Reply With Quote
  #4  
Old April 10th, 2002, 07:52 AM
Iburford Iburford is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Posts: 2 Iburford User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thanks

Thanks for all the assistance. It seems fine now.

Reply With Quote
  #5  
Old April 21st, 2002, 11:24 AM
aabha aabha is offline
Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2002
Location: India
Posts: 7 aabha User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via Yahoo to aabha
u can concatanate an "\n" character in btn the strings...

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesJava Help > New Line!!


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway