Forums
This topic is locked
text display on page
Posted 03 Jan 2002 21:17:30
1
has voted
03 Jan 2002 21:17:30 David Behan posted:
When I enter text into the database and press enter to show a new paragraph in the text field. How can I get it to come out the same when extracting the text to a web page.For example, in typing this I just pressed enter twice to go to a new paragraph. When you view this on the web page, that is the way it appears - like a new paragraph.
When I do the same using my own it ignores the gap between the lines and combines all the text as one paragraph. How can I modify this???
Please help... cheers
C:/Dos
C:/Dos/Run
Run/Dos/Run
Replies
Replied 03 Jan 2002 22:44:39
03 Jan 2002 22:44:39 Viktor Farcic replied:
The problem is that information about paragraph is stored as 'vbcrlf' and in HTML it's '<br>'. You just need to replace every 'vbcrlf' with '<br>'. This will work only if you're using asp.
Find recordset field where you want to preserve paragraphs. It should look like:
<% =(RecordsetName.Fields.Item("FieldName".Value)%>
Replace it with:
<% = Replace((RecordsetName.Fields.Item("FieldName".Value), VbCrLf, "<BR>" %>
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
When I enter text into the database and press enter to show a new paragraph in the text field. How can I get it to come out the same when extracting the text to a web page.
For example, in typing this I just pressed enter twice to go to a new paragraph. When you view this on the web page, that is the way it appears - like a new paragraph.
When I do the same using my own it ignores the gap between the lines and combines all the text as one paragraph. How can I modify this???
Please help... cheers
C:/Dos
C:/Dos/Run
Run/Dos/Run
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
Viktor Farcic
TalkZone Manager
Find recordset field where you want to preserve paragraphs. It should look like:
<% =(RecordsetName.Fields.Item("FieldName".Value)%>
Replace it with:
<% = Replace((RecordsetName.Fields.Item("FieldName".Value), VbCrLf, "<BR>" %>
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
When I enter text into the database and press enter to show a new paragraph in the text field. How can I get it to come out the same when extracting the text to a web page.
For example, in typing this I just pressed enter twice to go to a new paragraph. When you view this on the web page, that is the way it appears - like a new paragraph.
When I do the same using my own it ignores the gap between the lines and combines all the text as one paragraph. How can I modify this???
Please help... cheers
C:/Dos
C:/Dos/Run
Run/Dos/Run
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
Viktor Farcic
TalkZone Manager