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

textbox adding extra crlf's

Status
Not open for further replies.

gagz

Programmer
Nov 21, 2002
333
US
I have a form with a textbox and everytime is submits i seem to get extra blank lines at the end (random amounts).

if for example i want to input the follwing to come out as:
---------------
this is the text line 1.

this is the text on line 3.
---------------

i would get something like:
---------------
this is the text line 1.

this is the text on line 3.


---------------

i wouldn't really care that its doing it if i could figure out how to get rid of the extras at the end, and not blank lines altogether (such as line 2).

any ideas?

thanks.
 
use the trim() function on the POST/GET variable containing the textarea value.
 
I think that's one of the steps i've already taken, but i'll try it again...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top