Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: html formatting pulling from db

Re: html formatting pulling from db

From: Bill Frost <Bill.Frost_at_NOSPAM.hpa.com.au>
Date: Tue, 6 Apr 1999 18:11:14 +1000
Message-ID: <7ecfle$n4a$1@m2.c2.telstra-mm.net.au>


You are probably better to use <pre> ... </pre> tags surrounding your lines.

This will preserve line breaks, but it will output the text in a fixed-pitch font.

Otherwise, insert <br> when you want to begin a newline, which will output in a variable-pitch font, but which may still linebreak before it hits a <br>.

:)BF

Steve Halko <steveh_at_redshift.com> wrote in message news:922256623.374.53_at_news.remarQ.com...
> Thats because HTML considers newlines as white space, just like spaces,
> tabs, etc. If you want to retain the line breaks, then you'll have to
> replace every occurrence of a newline character in your stored character
> string with an HTML line break, i.e. <BR>
>
>
> David Swenson <davswens_at_prairie.nodak.edu> wrote in message
> news:7d4ocb$iau$1_at_node2.nodak.edu...
> >
> > I have information stored in a oracle database and i want to display it
in
> 2
> > different formats...
> > Here is the problem,
> > I am having users enter information in a text box, and they
tend
> > to format it...
> > ie.
> > A. John is a good worker.
> >
> > 1. He works hard.
> >
> > 2. ...
> >
> > B. etc...
> >
> > However when i pull it out of the database and try to display it in html
> the
> > formatting is not preserved...
> > ie.
> > A. John is a good worker.1. He works hard.2...B...
> >
> > It will preserve the format if I put it back in a textbox, but that is
not
> > an option (unless there is a way to turn off editing in a textbox).
> >
> >
> > I am not sure if this is the correct newsgroup to ask this. If not, it
> > would help if someone could point me to a more suitable one.
> >
> > thanks
> > David
> >
> >
>
>
Received on Tue Apr 06 1999 - 03:11:14 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US