Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 19th, 2005, 02:19 PM
JStrauss
Guest
 
Posts: n/a
Default Display multiple lines

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


  #2  
Old July 19th, 2005, 02:19 PM
dlbjr
Guest
 
Posts: n/a
Default Re: Display multiple lines

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


  #3  
Old July 19th, 2005, 02:19 PM
JStrauss
Guest
 
Posts: n/a
Default Re: Display multiple lines

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" <dlbjr@imlost.com> wrote in message
news:eR4dHItbEHA.3096@tk2msftngp13.phx.gbl...[color=blue]
> 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[/color]
of[color=blue]
> the style.
> </span>
> </body>
> </html>
>
>
> -dlbjr
>
> Discerning resolutions for the alms
>
>[/color]


  #4  
Old July 19th, 2005, 02:19 PM
John
Guest
 
Posts: n/a
Default Re: Display multiple lines

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




"JStrauss" <subs@strausselec.com> schreef in bericht
news:%23SDJBwwbEHA.3480@TK2MSFTNGP11.phx.gbl...[color=blue]
> Thanks for the help. Unfortunately, the display is still on a single line.[/color]
I[color=blue]
> 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" <dlbjr@imlost.com> wrote in message
> news:eR4dHItbEHA.3096@tk2msftngp13.phx.gbl...[color=green]
> > 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[/color][/color]
class[color=blue]
> of[color=green]
> > the style.
> > </span>
> > </body>
> > </html>
> >
> >
> > -dlbjr
> >
> > Discerning resolutions for the alms
> >
> >[/color]
>
>[/color]


  #5  
Old July 19th, 2005, 02:19 PM
Aaron [SQL Server MVP]
Guest
 
Posts: n/a
Default Re: Display multiple lines

http://www.aspfaq.com/2188

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




"JStrauss" <subs@strausselec.com> wrote in message
news:erE$h4sbEHA.1656@TK2MSFTNGP09.phx.gbl...[color=blue]
> 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[/color]
(multiple[color=blue]
> 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
>
>[/color]


  #6  
Old July 19th, 2005, 02:19 PM
JStrauss
Guest
 
Posts: n/a
Default Re: Display multiple lines

Still no change.

Joe

"John" <n o b o d y@spam.com> wrote in message
news:cQsLc.190702$yP1.9340006@phobos.telenet-ops.be...[color=blue][color=green]
> ><%= Replace(strWorkReq,vbCrlf,"<br>") %><[/color]
>
>
>
>
> "JStrauss" <subs@strausselec.com> schreef in bericht
> news:%23SDJBwwbEHA.3480@TK2MSFTNGP11.phx.gbl...[color=green]
> > Thanks for the help. Unfortunately, the display is still on a single[/color][/color]
line.[color=blue]
> I[color=green]
> > 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" <dlbjr@imlost.com> wrote in message
> > news:eR4dHItbEHA.3096@tk2msftngp13.phx.gbl...[color=darkred]
> > > 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[/color][/color]
> class[color=green]
> > of[color=darkred]
> > > the style.
> > > </span>
> > > </body>
> > > </html>
> > >
> > >
> > > -dlbjr
> > >
> > > Discerning resolutions for the alms
> > >
> > >[/color]
> >
> >[/color]
>
>[/color]


  #7  
Old July 19th, 2005, 02:19 PM
Aaron [SQL Server MVP]
Guest
 
Posts: n/a
Default Re: Display multiple lines

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" <subs@strausselec.com> wrote in message
news:eWTMnGzbEHA.2844@TK2MSFTNGP12.phx.gbl...[color=blue]
> Still no change.[/color]


  #8  
Old July 19th, 2005, 02:19 PM
JStrauss
Guest
 
Posts: n/a
Default Re: Display multiple lines

No change from this tip either.

Joe

"Aaron [SQL Server MVP]" <ten.xoc@dnartreb.noraa> wrote in message
news:espMNYybEHA.384@TK2MSFTNGP10.phx.gbl...[color=blue]
> http://www.aspfaq.com/2188
>
> --
> http://www.aspfaq.com/
> (Reverse address to reply.)
>
>
>
>
> "JStrauss" <subs@strausselec.com> wrote in message
> news:erE$h4sbEHA.1656@TK2MSFTNGP09.phx.gbl...[color=green]
> > 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[/color]
> (multiple[color=green]
> > lines) in a resulting HTML page. The data displays on a single line
> > (obviously) and does not wrap without manipulation of the string[/color][/color]
variable.[color=blue][color=green]
> > Is there an easier way to display the data?
> >
> > Thanks,
> > Joe
> >
> >[/color]
>
>[/color]


  #9  
Old July 19th, 2005, 02:19 PM
Aaron [SQL Server MVP]
Guest
 
Posts: n/a
Default Re: Display multiple lines

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" <subs@strausselec.com> wrote in message
news:eFjedLzbEHA.2816@TK2MSFTNGP11.phx.gbl...[color=blue]
> No change from this tip either.
>
> Joe[/color]


  #10  
Old July 19th, 2005, 02:19 PM
Larry Bud
Guest
 
Posts: n/a
Default Re: Display multiple lines

"JStrauss" <subs@strausselec.com> wrote in message news:<erE$h4sbEHA.1656@TK2MSFTNGP09.phx.gbl>...[color=blue]
> 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?[/color]

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.
  #11  
Old July 19th, 2005, 02:19 PM
dlbjr
Guest
 
Posts: n/a
Default Re: Display multiple lines

<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!


  #12  
Old July 19th, 2005, 02:19 PM
dlbjr
Guest
 
Posts: n/a
Default Re: Display multiple lines

Sounds like a browser version / vendor issue.

--
dlbjr
Pleading sagacious indoctrination!


  #13  
Old July 19th, 2005, 02:20 PM
JStrauss
Guest
 
Posts: n/a
Default Re: Display multiple lines

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]" <ten.xoc@dnartreb.noraa> wrote in message
news:%23cEX1PzbEHA.2408@tk2msftngp13.phx.gbl...[color=blue]
> 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[/color]
but[color=blue]
> probably aren't.
>
> --
> http://www.aspfaq.com/
> (Reverse address to reply.)
>
>
>
>
>
>
> "JStrauss" <subs@strausselec.com> wrote in message
> news:eFjedLzbEHA.2816@TK2MSFTNGP11.phx.gbl...[color=green]
> > No change from this tip either.
> >
> > Joe[/color]
>
>[/color]


  #14  
Old July 19th, 2005, 02:20 PM
JStrauss
Guest
 
Posts: n/a
Default Re: Display multiple lines

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]" <ten.xoc@dnartreb.noraa> wrote in message
news:u%23dpMLzbEHA.3664@TK2MSFTNGP12.phx.gbl...[color=blue]
> 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" <subs@strausselec.com> wrote in message
> news:eWTMnGzbEHA.2844@TK2MSFTNGP12.phx.gbl...[color=green]
> > Still no change.[/color]
>
>[/color]


  #15  
Old July 19th, 2005, 02:20 PM
Aaron [SQL Server MVP]
Guest
 
Posts: n/a
Default Re: Display multiple lines

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" <subs@strausselec.com> wrote in message
news:OdGJVb$bEHA.2660@tk2msftngp13.phx.gbl...[color=blue]
> 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[/color]
is[color=blue]
> not putting any of this characters in the string, so I might have to write[/color]
a[color=blue]
> small function to manually break the lines into some number of characters.
>
> It shouldn't be this difficult.....
>
> Thanks,
> Joe
>
> "Aaron [SQL Server MVP]" <ten.xoc@dnartreb.noraa> wrote in message
> news:u%23dpMLzbEHA.3664@TK2MSFTNGP12.phx.gbl...[color=green]
> > 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" <subs@strausselec.com> wrote in message
> > news:eWTMnGzbEHA.2844@TK2MSFTNGP12.phx.gbl...[color=darkred]
> > > Still no change.[/color]
> >
> >[/color]
>
>[/color]


 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles