This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

textarea in Jsp shows fisrt line indented always?  RSS feed

 
wei Qiao
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I had this problem happened to me, the text area I used in one Jsp page to display a string field retrieved from datebase(the string is trimed before displayed). The first line is always indented for about 10 char long.
Can this be fixed? I set align=left already. Also the Text area is within a table cell.
Thanks!
 
David Freels
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is there a space between the opening and closing textarea tags?
<textarea> </textarea>
-OR-
<textarea>
</textarea>
Try placing the tags together and on the same line.
David
Sun Certified Programmer for the Java2 Platform
 
prabhat kumar
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ya it can be fixed ..
if u see the generated html
then it will be someting like this
<textarea>
ur text starts here</textarea>
see that there is no space between
<textarea></textarea>
if it is then u will see space in between
hope it will help u ..
 
wei Qiao
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes, there is space,
<CODE>
<td>
<TEXTAREA NAME="description" COLS=40 ROWS=6 readonly>
<%=folioDescs[0].getFolioDescription().trim() %>
</TEXTAREA>
</td>
</CODE>
is it wrong? or should be placed as:
<CODE>
<td>
<TEXTAREA NAME="description" COLS=40 ROWS=6 readonly><%=folioDescs[0].getFolioDescription().trim() %></TEXTAREA>
</td>
</CODE>
 
David Freels
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try the second option and see if that helps. Maybe the returns are being interpreted into spaces.
David
Sun Certified Programmer for the Java2 Platform
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!