|
Posted by Runnin' on Empty on 09/19/06 22:05
"1995 Cobra" <mg@deepskystudio.com> wrote in message
news:1158602053.932748.236530@b28g2000cwb.googlegroups.com...
> Hello everyone. I have a display problem (go figure), but it may be
> complicated. Essentially, I have a textarea that a user types in. While
> typing, they can put in paragraphs, line breaks, bullets, etc. They
> click save and the data is written to a MySQL database. I then display
> their input on a separate page with vbscript. Problem is, no matter
> what they have typed it is displayed as one long paragraph. Any ideas
> or tutorials on getting over this and displaying their text as they
> intended? Thanks.
>
The problem you are experiencing is the textarea box formats text with, and
reads ASCII formatting codes, which, when pulled from the DB and thrown onto
a web page the browser igonores.
The browser is expecting HTML formatting, without it, the text is just one
big blob, as far as the browser is concerned.
For simple formatting you can code your vbscript to replace chr(10) with
<br> in your output
[ie- myText = Replace(someText, Chr(10), "<br>").]
If you want more than that, you will have to code to replace the ASCII with
HTML on the way into the DB.
Navigation:
[Reply to this message]
|