|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
You eat, breathe and sleep innovation. Build your mobile intelligence with BlackBerry® experts this July. Register Today! |
|
#1
|
|||
|
|||
|
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") %> <%= new java.util.Date() %> </textarea> |
|
#2
|
||||
|
||||
|
something like /n or /r (I'm not sure?)
__________________
My blog about OpenSource Databases PDF tutorials about OSS databases, DBMonster ... Please contribute to Open Source Development, fill bug reports!!! Developer Shed eSupport Commented my.ini/my.cnf (PLEASE ADD YOUR OWN CONFIG TRICK) An introduction to database normalization Natural or Surrogate key Custom ordering for your results Correlated and uncorrelated subqueries Don't turn your outer joins into inner joins |
|
#3
|
|||
|
|||
|
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' |
|
#4
|
|||
|
|||
|
Thanks
Thanks for all the assistance. It seems fine now.
|
|
#5
|
|||
|
|||
|
u can concatanate an "\n" character in btn the strings...
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Java Help > New Line!! |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|