Forum Moderators: open

Message Too Old, No Replies

Memo Formating

         

stevelibby

12:15 pm on Feb 10, 2005 (gmt 0)

10+ Year Member



Is there a way in which i can format a memo to show paragraphs? if i add the text into a memo box i hit enter for new paragraph that shows as i want it to be,but when i place it on web page via sql, it goes back to normal text.
Thank you in advance

coopster

12:49 pm on Feb 10, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



You need to convert the newlines to paragraph elements before you push the information to output. Either that or wrap the text in <pre> tags.

stevelibby

12:53 pm on Feb 10, 2005 (gmt 0)

10+ Year Member



forgive me i am a little lost on that one. Can you explain in alittle more details please.

coopster

12:58 pm on Feb 10, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



From your first post, it sounds as though you are using a memo box (assuming you are referring to a <textarea> element) to populate a column in your database. The formatting in the <textarea> looks like you want because you are entering newlines for paragraphs. The trouble is, the textarea is not using a <p> element, it is using a newline. This gets stored in the database. Now, when you go to retrieve that value, it is still a newline and HTML isn't going to format it as a newline (or paragraph) as you expect. Browsers typically "condense" white space down to a single space when interpreting the HTML.

stevelibby

1:11 pm on Feb 10, 2005 (gmt 0)

10+ Year Member



sorry to confuse you. i should have explained further. i use a front page wizard to create my results on front page.
what i do is create the tables in access then send it to my server and bring it to web page.
whilst my knowledge isnt bad it aint great when it comes to hard asp programming. Is there something that i can put in the memo box for it to indicate new line? as i am unable to change the data that is in the database wizard?
Hope this helps.

coopster

1:23 pm on Feb 10, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



I think we are still referring to the same issue at hand though. It has to do with the understanding of how browsers interpret whitespace. Here's the reference to whitespace in the HTML 4.01 specification [w3.org], maybe that will clear things up a bit.

stevelibby

1:41 pm on Feb 10, 2005 (gmt 0)

10+ Year Member



Thank you, but i still dont quite get what i need to do to solve this problem. I have bundled text into a memo box, how can i format it? can i use css? can i do something with the box itself?

mattglet

7:09 pm on Feb 10, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



stevelibby-

Can you provide a code snippet as to how you are pulling the data from the database, and displaying it on the webpage?

stevelibby

8:55 pm on Feb 10, 2005 (gmt 0)

10+ Year Member



do you want it from the web page or from where i write it in front page?

tomasz

9:25 pm on Feb 10, 2005 (gmt 0)

10+ Year Member



to display your line breaks you can replace CRLF with <br>

output=replace(txtMemo,VbCrLf,"<br>")

mattglet

10:47 pm on Feb 10, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



FrontPage