Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Text area question

Status
Not open for further replies.

Bamarama

Programmer
Dec 29, 2006
49
US
I have a txt area that I am using for editing purposes.

For the initial value of the box, how can I tell it to put a space in?

for example...

I want it to show...

First Name

Last name

instead of

FirstName
Last Name

Basically I want to put a <br> in there. How would I go about doing this??

TIA
 
You need to use an ascii line break:

Code:
\n\r



----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.

Behind the Web, Tips and Tricks for Web Development.
 
I searched and saw that, wasn't sure if it fit my application.

But I do not understand where I would place that. Everywhere I put it, it shows up as "\r\n
 
Here is the actual code
Code:
							<textarea name="s_song" style="width: 569px; height: 690px" cols="20"><%=var1%>

<%

 if var3 = var4 then
 %>
Words and music by: <%=var4%>
 
 <% else %>
 Words By: <%=var3%>
 Music By: <%=var4%>
 
  <%end if%>

<%=var4a%></textarea>

variables aside, where would I place this code??
 
Anywhere you want a line break. For instance say you want the following inside a textarea:

Line 1
Line 2
Line 3
Line 4

Code:
<textarea>
Line1 
\n\r
Line2
\n\r
Line3 \n\r Line4

</textarea>

Unless you are parsing the text area contents afterward, it should directly work.



----------------------------------
Phil AKA Vacunita
----------------------------------
Ignorance is not necessarily Bliss, case in point:
Unknown has caused an Unknown Error on Unknown and must be shutdown to prevent damage to Unknown.

Behind the Web, Tips and Tricks for Web Development.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top