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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiline Textbox

Status
Not open for further replies.

PeteCan

Programmer
Jan 15, 2002
60
GB
I am using a textbox to show data extracted from the database, the code takes the format of:

<Input name=&quot;IncResolution&quot; value=&quot;<%=objRS.Fields(&quot;IncResolution&quot;).value%>&quot;<%=UpdateMode%> style=&quot;HEIGHT: 68px; WIDTH: 496px&quot;></td>

However the text does not wrap around and is just displayed on the one line.
How do I make it Multiline so it wraps?

 
try this
this will break it into two lines

<Input name=&quot;IncResolution&quot; value=&quot;<%=objRS.Fields(&quot;IncResolution&quot;).value%>&quot;<% lft = len(UpdateMode)
Response.write(Left(lft,UpdateMode) & &quot;<br>&quot;)
Response.write(Right(lft,UpdateMode))%> style=&quot;HEIGHT: 68px; WIDTH: 496px&quot;></td>

if you are not sure of how big the line is , take an arbitrary length of characters per line and add a &quot;<br>&quot; to updatemode after a certain amount of characters
 
Why not use a textarea???

<textarea name=&quot;IncResolution&quot; style=&quot;HEIGHT: 68px; WIDTH: 496px&quot; <%=UpdateMode%>><%=objRS(&quot;incResolution&quot;)%></textarea> Get the Best Answers! faq333-2924
Is this an asp FAQ? faq333-3048

mikewolf@tst-us.com
 
I would say the answer wouldn't be beter then mwolf's here also. That is what the textarea form field is for. you can also use a bit of css to take out the overflow etc.. but it seems kind of rediculous to try and use a text box for something that should be a textarea _______________________________________________
{ str = &quot;sleep is good for you. sleep gives you the energy you need to function&quot;;
ptr = /sleep/gi;Nstr = str.replace(ptr,&quot;coffee&quot;);alert(Nstr); }

_______________________________________________
for the best results to your questions: FAQ333-2924
has you're questio
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top