Forum Moderators: open
I have a scrolling textbox form on one of my sites. The information the person fills out gets emailed to me. However, if they type this into a form:
Hello,
please send me more information!
sincerly,
bob user
it ends up comeing to me like:
Hello,please send me more information!sincerly,bob user
and it can be a bit of a pain sometimes when they have large lists entered into the textbox.
any help?
The text in the textbox is stuck into a variable, which in turn is stuck into an HTML page the asp page generates and that whole thing is emailed.
Hmm.. on retrospect mayby i can use the replace function to replace char(10) with <br>....
<pre wrap> <% Recordset %> </pre>
In essence, your html page is looking for HTML text unless you tell it that it's not. Since this is preformatted, the <pre> tag does the trick. The "wrap" inside the tag just makes sure it doesn't make a really wide page if there's a long sentence/paragraph between CR's.
G.
Inside the textarea tag include this attribute.
wrap="hard"
wrap
In Netscape and Microsoft browsers, this attribute controls word wrap behavior. A value of off for the attribute forces the <textarea> not to wrap text, so the viewer must manually enter line breaks.
A value of hard causes word wrap and includes line breaks in text submitted to the server.
A value of soft causes word wrap but removes line breaks from text submitted to the server.
Internet Explorer supports a value of physical, which is equivalent to Netcape's hard value, and a value of virtual, which is equivalent to Netscape's soft value.
If the wrap attribute is not included, text will still wrap under Internet Explorer, but under Netscape it will scroll horizontally in the text box. It is always a good idea to include the wrap attribute.
Response.Write Replace(MyString, chr(13),"<br />")
so when it inserts a form that has
1.one
2.two
3.three
inserts as
1.one(x)2.two(x)3.three
where (x) is whater it would be (dont know for certain) and then spits that out and puts the <BR> in .
Could that appproach help