Display multiple lines

Discussion in 'ASP General' started by JStrauss, Jul 21, 2004.

  1. JStrauss

    JStrauss Guest

    Hello,
    Can anybody give me some tips on the best and/or easiest way to display
    multiple lines in a field. The data is collected from a "textarea" field
    when the form is submitted, and I want to display all of the data (multiple
    lines) in a resulting HTML page. The data displays on a single line
    (obviously) and does not wrap without manipulation of the string variable.
    Is there an easier way to display the data?

    Thanks,
    Joe
     
    JStrauss, Jul 21, 2004
    #1
    1. Advertising

  2. JStrauss

    dlbjr Guest

    Joe,

    Here is a sample of html output.

    <html>
    <head>
    <title></title>
    </head>
    <style>
    ..info
    {
    width: 150px;
    }
    </style>
    <body>
    <span class='info'>
    This is where your text needs to go. Just set the width in the info class of
    the style.
    </span>
    </body>
    </html>


    -dlbjr

    Discerning resolutions for the alms
     
    dlbjr, Jul 21, 2004
    #2
    1. Advertising

  3. JStrauss

    JStrauss Guest

    Thanks for the help. Unfortunately, the display is still on a single line. I
    have included some snippets of the code:

    <html>
    <style>
    ..info
    {
    width: 300px;
    }
    </style><body bgcolor=#ffffff>
    ..
    ..
    Work Requested / Problem Condition<br>
    <span class='info'><%= strWorkReq %><br></span>
    Services Performed<br>
    <span class='info'><%= strServicePerf %><br>
    </span>

    Does this look correct?

    Thanks for any help.

    Joe


    "dlbjr" <> wrote in message
    news:...
    > Joe,
    >
    > Here is a sample of html output.
    >
    > <html>
    > <head>
    > <title></title>
    > </head>
    > <style>
    > .info
    > {
    > width: 150px;
    > }
    > </style>
    > <body>
    > <span class='info'>
    > This is where your text needs to go. Just set the width in the info class

    of
    > the style.
    > </span>
    > </body>
    > </html>
    >
    >
    > -dlbjr
    >
    > Discerning resolutions for the alms
    >
    >
     
    JStrauss, Jul 21, 2004
    #3
  4. JStrauss

    John Guest

    ><%= Replace(strWorkReq,vbCrlf,"<br>") %><




    "JStrauss" <> schreef in bericht
    news:%...
    > Thanks for the help. Unfortunately, the display is still on a single line.

    I
    > have included some snippets of the code:
    >
    > <html>
    > <style>
    > .info
    > {
    > width: 300px;
    > }
    > </style><body bgcolor=#ffffff>
    > .
    > .
    > Work Requested / Problem Condition<br>
    > <span class='info'><%= strWorkReq %><br></span>
    > Services Performed<br>
    > <span class='info'><%= strServicePerf %><br>
    > </span>
    >
    > Does this look correct?
    >
    > Thanks for any help.
    >
    > Joe
    >
    >
    > "dlbjr" <> wrote in message
    > news:...
    > > Joe,
    > >
    > > Here is a sample of html output.
    > >
    > > <html>
    > > <head>
    > > <title></title>
    > > </head>
    > > <style>
    > > .info
    > > {
    > > width: 150px;
    > > }
    > > </style>
    > > <body>
    > > <span class='info'>
    > > This is where your text needs to go. Just set the width in the info

    class
    > of
    > > the style.
    > > </span>
    > > </body>
    > > </html>
    > >
    > >
    > > -dlbjr
    > >
    > > Discerning resolutions for the alms
    > >
    > >

    >
    >
     
    John, Jul 21, 2004
    #4
  5. http://www.aspfaq.com/2188

    --
    http://www.aspfaq.com/
    (Reverse address to reply.)




    "JStrauss" <> wrote in message
    news:erE$...
    > Hello,
    > Can anybody give me some tips on the best and/or easiest way to display
    > multiple lines in a field. The data is collected from a "textarea" field
    > when the form is submitted, and I want to display all of the data

    (multiple
    > lines) in a resulting HTML page. The data displays on a single line
    > (obviously) and does not wrap without manipulation of the string variable.
    > Is there an easier way to display the data?
    >
    > Thanks,
    > Joe
    >
    >
     
    Aaron [SQL Server MVP], Jul 21, 2004
    #5
  6. JStrauss

    JStrauss Guest

    Still no change.

    Joe

    "John" <n o b o d > wrote in message
    news:cQsLc.190702$-ops.be...
    > ><%= Replace(strWorkReq,vbCrlf,"<br>") %><

    >
    >
    >
    >
    > "JStrauss" <> schreef in bericht
    > news:%...
    > > Thanks for the help. Unfortunately, the display is still on a single

    line.
    > I
    > > have included some snippets of the code:
    > >
    > > <html>
    > > <style>
    > > .info
    > > {
    > > width: 300px;
    > > }
    > > </style><body bgcolor=#ffffff>
    > > .
    > > .
    > > Work Requested / Problem Condition<br>
    > > <span class='info'><%= strWorkReq %><br></span>
    > > Services Performed<br>
    > > <span class='info'><%= strServicePerf %><br>
    > > </span>
    > >
    > > Does this look correct?
    > >
    > > Thanks for any help.
    > >
    > > Joe
    > >
    > >
    > > "dlbjr" <> wrote in message
    > > news:...
    > > > Joe,
    > > >
    > > > Here is a sample of html output.
    > > >
    > > > <html>
    > > > <head>
    > > > <title></title>
    > > > </head>
    > > > <style>
    > > > .info
    > > > {
    > > > width: 150px;
    > > > }
    > > > </style>
    > > > <body>
    > > > <span class='info'>
    > > > This is where your text needs to go. Just set the width in the info

    > class
    > > of
    > > > the style.
    > > > </span>
    > > > </body>
    > > > </html>
    > > >
    > > >
    > > > -dlbjr
    > > >
    > > > Discerning resolutions for the alms
    > > >
    > > >

    > >
    > >

    >
    >
     
    JStrauss, Jul 21, 2004
    #6
  7. Did you look at http://www.aspfaq.com/2188 ?

    Which, among other things, recommends using chr(10) because your comment
    area does not necessarily include correct vbCrLf pairs.

    --
    http://www.aspfaq.com/
    (Reverse address to reply.)




    "JStrauss" <> wrote in message
    news:...
    > Still no change.
     
    Aaron [SQL Server MVP], Jul 21, 2004
    #7
  8. JStrauss

    JStrauss Guest

    No change from this tip either.

    Joe

    "Aaron [SQL Server MVP]" <> wrote in message
    news:...
    > http://www.aspfaq.com/2188
    >
    > --
    > http://www.aspfaq.com/
    > (Reverse address to reply.)
    >
    >
    >
    >
    > "JStrauss" <> wrote in message
    > news:erE$...
    > > Hello,
    > > Can anybody give me some tips on the best and/or easiest way to display
    > > multiple lines in a field. The data is collected from a "textarea" field
    > > when the form is submitted, and I want to display all of the data

    > (multiple
    > > lines) in a resulting HTML page. The data displays on a single line
    > > (obviously) and does not wrap without manipulation of the string

    variable.
    > > Is there an easier way to display the data?
    > >
    > > Thanks,
    > > Joe
    > >
    > >

    >
    >
     
    JStrauss, Jul 21, 2004
    #8
  9. Then you're going to have to show us exactly what is going into the
    database, so we know what characters are assumed to be carriage returns but
    probably aren't.

    --
    http://www.aspfaq.com/
    (Reverse address to reply.)






    "JStrauss" <> wrote in message
    news:...
    > No change from this tip either.
    >
    > Joe
     
    Aaron [SQL Server MVP], Jul 21, 2004
    #9
  10. JStrauss

    Larry Bud Guest

    "JStrauss" <> wrote in message news:<erE$>...
    > Hello,
    > Can anybody give me some tips on the best and/or easiest way to display
    > multiple lines in a field. The data is collected from a "textarea" field
    > when the form is submitted, and I want to display all of the data (multiple
    > lines) in a resulting HTML page. The data displays on a single line
    > (obviously) and does not wrap without manipulation of the string variable.
    > Is there an easier way to display the data?


    It's not "obviously", because that's not the default behavior of HTML.
    HTML always wraps, unless you specify otherwise. Is the data in a
    table? If so, you probably have the "nowrap" flag turned on. If it's
    not in a table, are you using the preformatted markup tag? Perhaps
    you're using a style sheet which turns NOWRAP on for all table cells.
     
    Larry Bud, Jul 21, 2004
    #10
  11. JStrauss

    dlbjr Guest

    <html>
    <style>
    ..info
    {
    width: 300px;
    }
    </style>
    <body bgcolor=#ffffff>

    Work Requested / Problem Condition
    <br>
    <span class='info'><%= strWorkReq %></span>
    <br>
    Services Performed
    <br>
    <span class='info'><%= strServicePerf %></span>
    <br>


    dlbjr
    Pleading sagacious indoctrination!
     
    dlbjr, Jul 21, 2004
    #11
  12. JStrauss

    dlbjr Guest

    Sounds like a browser version / vendor issue.

    --
    dlbjr
    Pleading sagacious indoctrination!
     
    dlbjr, Jul 21, 2004
    #12
  13. JStrauss

    JStrauss Guest

    Aaron,
    Thanks for your comments. The data is collected in a ASP form "textarea"
    field (with wrap=physical) and stored in a vbscript variable when the form
    is submitted. The data is then displayed in an HTML form. There is no
    database involved. When the data is input into the first form, the lines
    wrap automatically in the textarea box. I have not seen any carriage return
    or line feed characters in the text (but I may be missing them), and have
    also tries several replace statements to change vbcrlf and &nbsp to html
    acceptable characters. If I manually put a hard return in the data entry
    form, the second form formats the display correctly, but that method is less
    than friendly.

    Here are a few snippets...
    Data collection process:
    <TABLE BORDER=0>
    <tr><td>Work Requested / Problem Condition</td><td><TEXTAREA NAME="WorkReq"
    COLS=40 ROWS=3 WRAP=Physical></TEXTAREA></td></tr>
    <tr><td>Services Performed</td><td><TEXTAREA NAME="ServicePerf" COLS=40
    ROWS=6 WRAP=Physical></TEXTAREA></td></tr>
    </TABLE>

    Data display process:
    <html>
    <style>
    ..info
    {
    width: 300px;
    }
    </style>
    ....
    ....
    Work Requested / Problem Condition<br>
    <span class='info'><%= Replace(strWorkReq,vbCrlf,"<br>") %></span>
    <br>

    Thanks for looking at this. I appreciate the help.

    Joe



    "Aaron [SQL Server MVP]" <> wrote in message
    news:%...
    > Then you're going to have to show us exactly what is going into the
    > database, so we know what characters are assumed to be carriage returns

    but
    > probably aren't.
    >
    > --
    > http://www.aspfaq.com/
    > (Reverse address to reply.)
    >
    >
    >
    >
    >
    >
    > "JStrauss" <> wrote in message
    > news:...
    > > No change from this tip either.
    > >
    > > Joe

    >
    >
     
    JStrauss, Jul 22, 2004
    #13
  14. JStrauss

    JStrauss Guest

    Aaron,
    I looked at this article, even though I am not using a database with this
    application. I have tried searching the string variable for occurrences of
    chr(10), chr(13) and vbcrlf. I can't find any occurrence of any of these
    characters in the string. My assumption is that the textarea input field is
    not putting any of this characters in the string, so I might have to write a
    small function to manually break the lines into some number of characters.

    It shouldn't be this difficult.....

    Thanks,
    Joe

    "Aaron [SQL Server MVP]" <> wrote in message
    news:u%...
    > Did you look at http://www.aspfaq.com/2188 ?
    >
    > Which, among other things, recommends using chr(10) because your comment
    > area does not necessarily include correct vbCrLf pairs.
    >
    > --
    > http://www.aspfaq.com/
    > (Reverse address to reply.)
    >
    >
    >
    >
    > "JStrauss" <> wrote in message
    > news:...
    > > Still no change.

    >
    >
     
    JStrauss, Jul 22, 2004
    #14
  15. Did you try using a table instead of a span?

    I can't reproduce your problem, anyway. Maybe you could show us a URL where
    this is happening. Maybe it's only happening in your own browser?

    --
    http://www.aspfaq.com/
    (Reverse address to reply.)




    "JStrauss" <> wrote in message
    news:OdGJVb$...
    > Aaron,
    > I looked at this article, even though I am not using a database with this
    > application. I have tried searching the string variable for occurrences of
    > chr(10), chr(13) and vbcrlf. I can't find any occurrence of any of these
    > characters in the string. My assumption is that the textarea input field

    is
    > not putting any of this characters in the string, so I might have to write

    a
    > small function to manually break the lines into some number of characters.
    >
    > It shouldn't be this difficult.....
    >
    > Thanks,
    > Joe
    >
    > "Aaron [SQL Server MVP]" <> wrote in message
    > news:u%...
    > > Did you look at http://www.aspfaq.com/2188 ?
    > >
    > > Which, among other things, recommends using chr(10) because your comment
    > > area does not necessarily include correct vbCrLf pairs.
    > >
    > > --
    > > http://www.aspfaq.com/
    > > (Reverse address to reply.)
    > >
    > >
    > >
    > >
    > > "JStrauss" <> wrote in message
    > > news:...
    > > > Still no change.

    > >
    > >

    >
    >
     
    Aaron [SQL Server MVP], Jul 22, 2004
    #15
    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. michael
    Replies:
    0
    Views:
    3,711
    michael
    Jun 9, 2004
  2. Jack
    Replies:
    9
    Views:
    2,691
  3. Replies:
    1
    Views:
    463
    Jonathan Mcdougall
    Dec 6, 2005
  4. Dave

    multiple changes on multiple lines

    Dave, Apr 2, 2005, in forum: Perl Misc
    Replies:
    1
    Views:
    110
    Gunnar Hjalmarsson
    Apr 2, 2005
  5. Cah Sableng
    Replies:
    0
    Views:
    245
    Cah Sableng
    Apr 23, 2007
Loading...

Share This Page