|
 |
asp_web_howto thread: Re: How to handle "Carriage Return" in IE?
Message #1 by "Chris Thompson" <cthompson@n...> on Fri, 28 Jun 2002 13:53:51 -0600
|
|
You have:
<%=3Dreplace(details("report"), "<br>", "
")%>
It needs to be the other way around like this:
<%=3Dreplace(details("report"), "
", "<br>")%>
Replace(String to search through, Item to look for, Item to replace it
with)
Thanks,
Chris Thompson
-+-+-+-+-+-+-+-+-+-+-+-
cthompson@n...
xxx-xxx-xxxx
-+-+-+-+-+-+-+-+-+-+-+-
-----Original Message-----
From: Brian Zeng [mailto:levin001@h...]
Sent: Friday, June 28, 2002 1:06 AM
To: ASP Web HowTo
Subject: [asp_web_howto] Re: How to handle "Carriage Return" in IE?
Sorry, forgot to mention I tried to use replace() function, but it
doesn't
work.
Here is the code I tried before:
------------------------------------------------------
<%=3Dreplace(details("report"), "<br>", "
")%>
------------------------------------------------------
as the ASCII value of Carriage Return is 013.
thanks
---
Improve your web design skills with these new books from Glasshaus.
Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=3Dnosim/theprogramm
e
r-20
Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=3Dnosim/theprogramm
e
r-20
Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=3Dnosim/theprogramm
e
r-20
Message #2 by william.sze@s... on Fri, 28 Jun 2002 09:21:28 -0400
|
|
While not recordset.eof
<%=recordset("columnname")%>
Response.Write(chr(13))
recordset.movenext
Wend
"Brian Zeng"
<levin001@h... To: "ASP Web HowTo" <asp_web_howto@p...>
ail.com> cc:
Subject: [asp_web_howto] How to handle "Carriage Return" in IE?
06/28/02 02:48
AM
Please respond
to "ASP Web
HowTo"
Hi:
I am having trouble display the "Return" char from the database.
I use the following form to collect data from the user:
---------------------------------------------------------
<textarea name="input" cols="28" rows="4" wrap="virtual"></TEXTAREA>
---------------------------------------------------------
If user's input is:
line1
line2
it will display in the IE as
line1 line2
If I create the recordset and retrieve the data
<%=recordset("columnname")%>
However it display in the textarea as
line1
line2
if I want to update the field. (It means the "return" key has been stored
properly in the database.
My question is how I can display the data with the "return" char.
i.e.
<%=recordset("columnname")%>
should display
line1
line2
not
line1 line2
thanks heaps
Brian
---
Improve your web design skills with these new books from Glasshaus.
Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
r-20
Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
r-20
Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
r-20
Message #3 by "Craig Flannigan" <ckf@k...> on Fri, 28 Jun 2002 11:07:09 +0100
|
|
If you want to show up Return/line feeds on a webpage, then use this replace
command...
<%=replace(details("report"), vbCrLf, "<br>")%>
The vbCrLf is the same as doing Chr(10) & Chr(13)
Regards
Craig.
-----Original Message-----
From: Brian Zeng [mailto:levin001@h...]
Sent: 28 June 2002 07:06
To: ASP Web HowTo
Subject: [asp_web_howto] Re: How to handle "Carriage Return" in IE?
Sorry, forgot to mention I tried to use replace() function, but it doesn't
work.
Here is the code I tried before:
------------------------------------------------------
<%=replace(details("report"), "<br>", "
")%>
------------------------------------------------------
as the ASCII value of Carriage Return is 013.
thanks
---
Improve your web design skills with these new books from Glasshaus.
Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
r-20
Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
r-20
Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
r-20
_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service on behalf of
Kingfield Heath Ltd. For further information visit
http://www.star.net.uk/stats.asp
_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service on behalf of Kingfield Heath Ltd. For further information visit
http://www.star.net.uk/stats.asp
Message #4 by "Brian Zeng" <levin001@h...> on Fri, 28 Jun 2002 07:05:56
|
|
Sorry, forgot to mention I tried to use replace() function, but it doesn't
work.
Here is the code I tried before:
------------------------------------------------------
<%=replace(details("report"), "<br>", "
")%>
------------------------------------------------------
as the ASCII value of Carriage Return is 013.
thanks
Message #5 by "Brian Zeng" <levin001@h...> on Fri, 28 Jun 2002 06:48:09
|
|
Hi:
I am having trouble display the "Return" char from the database.
I use the following form to collect data from the user:
---------------------------------------------------------
<textarea name="input" cols="28" rows="4" wrap="virtual"></TEXTAREA>
---------------------------------------------------------
If user's input is:
line1
line2
it will display in the IE as
line1 line2
If I create the recordset and retrieve the data
<%=recordset("columnname")%>
However it display in the textarea as
line1
line2
if I want to update the field. (It means the "return" key has been stored
properly in the database.
My question is how I can display the data with the "return" char.
i.e.
<%=recordset("columnname")%>
should display
line1
line2
not
line1 line2
thanks heaps
Brian
|
|
 |