Page 1 of 1
Whitespace in my tables
Posted: Sun Jan 28, 2007 6:11 pm
by superdezign
All of my editable content through my table creates about 3 tab whitespaces in front of text whenever it is submitted to the table.
Has anyone had this problem before?
The table data is of type TEXT, and it's updated through a simple UPDATE table SET blah=blah WHERE blah
Posted: Sun Jan 28, 2007 6:16 pm
by louie35
is the value comming from a textarea by any chance?
use
before the insert statement
Posted: Sun Jan 28, 2007 6:55 pm
by superdezign
Why, yes it is. My other company always uses FCKeditor, so I hadn't touched textareas in a while. Thank you
This get's rid of whitespace in the document it's displayted it, but trim isn't quite doing it for the text displayed inside of the textare. It no longers add more whitespace, but it keeps the initial 3 tabs, regardless of the application of trim(). I'll probably figure it out though.
Posted: Sun Jan 28, 2007 7:04 pm
by superdezign
Problem solved. The indentation in my code counted as textarea white space. How annoying is that? :-p
Posted: Mon Jan 29, 2007 1:50 am
by louie35
yes indeed. a common mistake is to write textarea like this
Code: Select all
<textarea name='name'>
</textarea>
' when it should be
<textarea name='name'></textarea>