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!

Extra characters in Textarea 1

Status
Not open for further replies.

lecooper

Programmer
Sep 6, 2001
4
0
0
US
My Comment fields (textareas) end up with 9 extra "special characters" after any data. If no text is added to the field when the page is submitted, then it puts just the 9 characters into the database. They seem to be "tab, Cr, Tab, Cr, Tab, Cr etc

Code:

<TEXTAREA NAME=&quot;Comments&quot;
STYLE=&quot;color: FF0000; font-size: 11px&quot;
WRAP=VIRTUAL COLS=&quot;065&quot; ROWS=&quot;004&quot;>
</TEXTAREA>

Dim Comments 'as String
Comments = Replace(Request.Form(&quot;Comments&quot;),&quot;'&quot;,&quot;''&quot;)
Comments = Trim(Comments)

'Add Comments if present
If Len(Comments) <> 0 Then
'Add the column name to the insert string
strInsert = strInsert & &quot;,Comments &quot;
'Add the value to the value string
strValues = strValues & &quot;,'&quot; & Comments & &quot;'&quot;
End if

These characters show up in the SQL database as a little &quot;square&quot; character.

Does anyone have any idea what is causing this or what to do about it?
Thanks
 
It may have to do with your editor.
Try to remove everything between the tags
<TEXTAREA .....></TEXTAREA>

Olav
 
Thanks, Olav
You were right - I had white space between opening & closing tags!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top