Forums

This topic is locked

Preserving the Whitespaces with HTML tags.

Posted 13 Jul 2001 15:50:16
1
has voted
13 Jul 2001 15:50:16 Louis Chamberland posted:
There is a code used to see the spaces inputed by the user when filling a form. Every time they insert a carriage return.

It is this code
-------------------------------------------
VBScript= Replace([column],chr(10),"<br>"
-------------------------------------------

Where do I insert this code in my page? At the top? Within the page? Where

Pretty simple HUH! As you can see I am not a programmer yet but I can be very resourcefull...

Thanks again to all the people using this Furom to help others that do have problems!!!

Louis Chamberland
2WINZ Communications Inc.

Replies

Replied 13 Jul 2001 17:58:18
13 Jul 2001 17:58:18 Joel Martinez replied:
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
There is a code used to see the spaces inputed by the user when filling a form. Every time they insert a carriage return.

It is this code
-------------------------------------------
VBScript= Replace([column],chr(10),"&lt;br&gt;"
-------------------------------------------

Where do I insert this code in my page? At the top? Within the page? Where

Pretty simple HUH! As you can see I am not a programmer yet but I can be very resourcefull...

Thanks again to all the people using this Furom to help others that do have problems!!!

Louis Chamberland
2WINZ Communications Inc.
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
say you drop a field from the database onto a page, you would have this:
<pre id=code><font face=courier size=2 id=code>&lt;%= rs.fields("name".value %&gt;</font id=code></pre id=code>


what you want, is this:
<pre id=code><font face=courier size=2 id=code>&lt;%=Replace(rs.fields("name".value ,chr(10),"&lt;br&gt;" %&gt;</font id=code></pre id=code>


you can also try this one:
<pre id=code><font face=courier size=2 id=code>&lt;%=Replace(rs.fields("name".value , VbCrLf,"&lt;br&gt;" %&gt;</font id=code></pre id=code>

hope it helps,
Joel Martinez

----------
Is this thing on?....

Edited by - joelmartinez on 07/13/2001 17:59:06

Reply to this topic