Results 1 to 10 of 10
01-11-2003, 04:06 PM #1
reading data from the textarea type
First off, I'd like to say this is a great site. Only a short time here and I'm loving it!
Here's my question, and maybe it's better off located in a different type of area, but here goes...
I have forms in which I use the TEXTAREA type, and the submission is read and processed to a DB by an ASP page with VBScript. The data that's entered via the TEXTAREA works just fine in the DB, but everytime the data is loaded into the TEXTAREA box in the editor, it throws extra spaces before and after the actual data. Usually around 6 spaces in front of the data, and 4 at the end. It keeps doing this whenever the page is loaded, so if I simply refresh the page holding the form, it will add an additional 4 spaces at the end every time. Like I said, the actual data posts to the DB without them, as I've checked that. I would really like the data to actually start at the beginning of the TEXTAREA box, though, and not keep adding the spaces at the end, as eventually the scroll bar shows that the box is forever long. Is there a simple answer to this??? :::: crosses fingers::::
01-11-2003, 07:28 PM #2
Hi there, welcome to the forums.
There is an asp function called trim -
trimmedString = trim(stringWithSpaces)
01-11-2003, 07:56 PM #3
Thank you for your response, and getting this trouble in the right location Interestingly enough, I've already implemented the 'Trim' function, but yet the problem remains. The data is getting trimmed great before being stored in the DB. It just persists on getting bumped over 6 spaces in the TEXTAREA box, plus having an extra 4 spaces at the end of it. When the page loads that contains the form, the value of the TEXTAREA is also being loaded via a query, and I've included the 'Trim' on that assignment as well. This problem truly baffles me. I'm not doing anything special with the TEXTAREA, and is very basic as follows:
<TEXTAREA name="chargrep" rows=3 cols=40>
I really do appreciate any help with this one... as it's not necessarily a function problem as much as a visual nuiscance
01-11-2003, 08:07 PM #4
Okay, need to know -
what database are you using?
What browser are you using?
01-11-2003, 08:11 PM #5
Oh , and try -
<TEXTAREA name="chargrep" rows=3 cols=40><%= strCharGRep%> </TEXTAREA>
01-11-2003, 08:11 PM #6
The database is powered by Access 2000, and I'm running IE 6.0.2800, on a Windows 2000 Advanced Server box....
01-11-2003, 08:32 PM #7
Hey, how about that? Putting it all on one line has fixed it!
Who would'a thunk it? LOL Thanks again, QuietDean! Can't tell you how much this will help, as I hate those little things that take away from a good looking page
01-12-2003, 09:07 AM #8
Cool.one to remember
01-12-2003, 11:12 AM #9
Yes, what's not seen when editing one's code is oftentimes the problem - probably due to the invisible CHR$10 and CHR$13 (and others) added to text lines by the editor but not seen by the user unless via binary dump.
When I can remember it, placing everything on one line oftentimes fixes otherwise insoluble problems.
10-24-2008, 02:29 PM #10
Re: reading data from the textarea type
can u please tell me how to do it