display line break

Discussion in 'HTML' started by Tony WONG, Oct 9, 2006.

  1. Tony WONG

    Tony WONG Guest

    the input is captured in <textarea>

    there are line breaks.

    how to display line breaks when using response.write? Thanks a lot.

    tony
    Tony WONG, Oct 9, 2006
    #1
    1. Advertising

  2. Tony WONG

    RvT Guest

    Tony WONG wrote:
    > the input is captured in <textarea>
    >
    > there are line breaks.
    >
    > how to display line breaks when using response.write? Thanks a lot.
    >
    > tony


    A line break is represented by chr(13), so you have to replace chr(13)
    by a <BR />.
    RvT, Oct 9, 2006
    #2
    1. Advertising

  3. Tony WONG

    RvT Guest

    RvT wrote:
    > Tony WONG wrote:
    > > the input is captured in <textarea>
    > >
    > > there are line breaks.
    > >
    > > how to display line breaks when using response.write? Thanks a lot.
    > >
    > > tony

    >
    > A line break is represented by chr(13), so you have to replace chr(13)
    > by a <BR />.


    I am not an ASP man, but I believe it is something like Replace(String,
    CHR(13), "<br />"), where the string should be the textarea form field.
    RvT, Oct 9, 2006
    #3
  4. RvT wrote:
    > Tony WONG wrote:
    >> the input is captured in <textarea>
    >>
    >> there are line breaks.
    >>
    >> how to display line breaks when using response.write? Thanks a lot.
    >>
    >> tony

    >
    > A line break is represented by chr(13), so you have to replace chr(13)
    > by a <BR />.
    >


    <BR> unless you're using XHTML.
    Harlan Messinger, Oct 9, 2006
    #4
  5. Tony WONG

    jojo Guest

    RvT wrote:

    >> the input is captured in <textarea>
    >> there are line breaks.
    >> how to display line breaks when using response.write? Thanks a lot.
    >>
    >> tony

    >
    > A line break is represented by chr(13), so you have to replace chr(13)
    > by a <BR />.
    >


    You could also put the whole text into a <pre> (unless is's a complete
    html-document with <head> and <body> or the input includes any tags
    which aren't allowed in a <pre>). Would perhaps be more easy than
    replacing all line breaks...
    HTH, jojo
    jojo, Oct 9, 2006
    #5
  6. Tony WONG

    tony wong Guest

    Thanks to all guys


    "jojo" <> ¼¶¼g©ó¶l¥ó·s»D:ege98p$dbg$...
    > RvT wrote:
    >
    >>> the input is captured in <textarea>
    >>> there are line breaks.
    >>> how to display line breaks when using response.write? Thanks a lot.
    >>>
    >>> tony

    >>
    >> A line break is represented by chr(13), so you have to replace chr(13)
    >> by a <BR />.
    >>

    >
    > You could also put the whole text into a <pre> (unless is's a complete
    > html-document with <head> and <body> or the input includes any tags which
    > aren't allowed in a <pre>). Would perhaps be more easy than replacing all
    > line breaks...
    > HTH, jojo
    tony wong, Oct 10, 2006
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Hugo
    Replies:
    10
    Views:
    1,306
    Matt Humphrey
    Oct 18, 2004
  2. kaushikshome
    Replies:
    4
    Views:
    762
    kaushikshome
    Sep 10, 2006
  3. Replies:
    12
    Views:
    959
  4. scad
    Replies:
    23
    Views:
    1,163
    Alf P. Steinbach
    May 17, 2009
  5. Marek Stepanek
    Replies:
    12
    Views:
    411
    Peter J. Holzer
    Sep 2, 2006
Loading...

Share This Page