Cgi: Print Text files with wordwrap!

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Walter Huf

    Cgi: Print Text files with wordwrap!

    Okay, I'm writing a cgi program, and I can send files and stuff, but how do
    I send text files with word wrap enabled? If a line of text is wider than
    the browser, and unsightly scrollbar appears on the bottom. How would I
    make it so that the text automatically wraps in the browser without putting
    a whole bunch of linebreaks in the text file?

    --Walter Huf--
    hufman@cobalty. com


    -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
    http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
    -----== Over 100,000 Newsgroups - 19 Different Servers! =-----
  • Dale Strickland-Clak

    #2
    Re: Cgi: Print Text files with wordwrap!

    Walter Huf pushed the bounds of literature with:
    [color=blue]
    > Okay, I'm writing a cgi program, and I can send files and stuff, but
    > how do I send text files with word wrap enabled? If a line of text is
    > wider than the browser, and unsightly scrollbar appears on the bottom.
    > How would I make it so that the text automatically wraps in the
    > browser without putting a whole bunch of linebreaks in the text file?
    >
    > --Walter Huf--
    > hufman@cobalty. com
    >
    >
    > -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
    > http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
    > -----== Over 100,000 Newsgroups - 19 Different Servers! =-----
    >[/color]

    If you send plain text, it will be presented exactly how you send it, line
    breaks and all.

    If you want it to wrap to the browser window, you have to make it look
    like HTML. The bare minimum you can get away with is <p> tags where you
    want new paragraphs - plus a head and a tail.



    --
    Dale Strickland-Clark
    Riverhall Systems Ltd, www.riverhall.co.uk

    Comment

    • Walter Huf

      #3
      Re: Cgi: Print Text files with wordwrap!

      "Dale Strickland-Clak" <dale@riverhall .NOSPAM.co.uk> wrote in
      news:Xns94A8F29 37636daleriverh allsystems@192. 168.8.150:
      [color=blue]
      >
      > If you send plain text, it will be presented exactly how you send it,
      > line breaks and all.
      >
      > If you want it to wrap to the browser window, you have to make it look
      > like HTML. The bare minimum you can get away with is <p> tags where
      > you want new paragraphs - plus a head and a tail.
      >
      >
      >[/color]

      Awesome, thanks!


      -----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
      http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
      -----== Over 100,000 Newsgroups - 19 Different Servers! =-----

      Comment

      • Piet van Oostrum

        #4
        Re: Cgi: Print Text files with wordwrap!

        >>>>> "Dale Strickland-Clak" <dale@riverhall .NOSPAM.co.uk> (DS) wrote:

        DS> If you send plain text, it will be presented exactly how you send it, line
        DS> breaks and all.

        DS> If you want it to wrap to the browser window, you have to make it look
        DS> like HTML. The bare minimum you can get away with is <p> tags where you
        DS> want new paragraphs - plus a head and a tail.

        And you should replace < > and & by &lt; &gt; and &amp;
        --
        Piet van Oostrum <piet@cs.uu.n l>
        URL: http://www.cs.uu.nl/~piet [PGP]
        Private email: P.van.Oostrum@h ccnet.nl

        Comment

        Working...