473,883 Members | 2,197 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Line Wrapping

Is there a way to prevent IE from forcing a line break? Below in LISTING 2,
you notice the table background image extention of '.jpg' begins a new line,
instead of staying on the same line as it's file name. Same happens with my
javascript onclick event, IE forces a line break and breaks my code. In my
asp code, you notice I'm inserting line breaks, but IE seems to do what it
wants. I should note, the below HTML results is actually 1 table of 40 or so
that asp builds as a string.

I mention that because some tables get rendered without line breaks
following the 'jpg' and javascript code. My prolem is that when IE forces
line breaks as below, the code doesn' work.

Any ideas?

LISTING 1 - CODE

ColorInfo = ColorInfo & "<table border=0
background=""im ages/prints/thumb_" & RS10("choiceDat a1") & ".jpg""
style='border:s olid 1pt #000000' cellpadding=0 cellspacing=0>" & chr(13) &
chr(10)
ColorInfo = ColorInfo & "<tr><td>" & chr(13) & chr(10)
ColorInfo = ColorInfo & "<a href=""""
onclick=""javas cript:PW('pop_p rint.asp?print= " & RS10("choiceDat a1") &
"',310,400);ret urn false;"">" & chr(13) & chr(10)
ColorInfo = ColorInfo & "<img src=""images/filler.gif"" width=60
height=40 border=0></a>" & chr(13) & chr(10)
ColorInfo = ColorInfo & "</td></tr></table></tr>" & chr(13) & chr(10)
ColorInfo = ColorInfo & "<tr><td align=center><f ont
face=""verdana, sans-serif"" size=1>" & Replace(RS10("c hoiceName"),"
","<br>",1, 1) & "</font></td></tr></table></td>" & chr(13) & chr(10)
LISTING 2 - RESULTS

<table border=0 background="ima ges/prints/thumb_Abbey
..jpg" style='border:s olid 1pt #000000' cellpadding=0 cellspacing=0>
<tr><td>
<a href="" onclick="javasc ript:PW('pop_pr int.asp?print=A bbey
',310,400);retu rn false;">
<img src="images/filler.gif" width=60 height=40 border=0></a>
</td></tr></table>
Jul 22 '05 #1
12 1867
put it in a Table Cell with NOWRAP on

--
Curt Christianson
Site & Scripts: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"scott" <sb*****@milesl umber.com> wrote in message
news:Ok******** *****@TK2MSFTNG P15.phx.gbl...
Is there a way to prevent IE from forcing a line break? Below in LISTING
2, you notice the table background image extention of '.jpg' begins a new
line, instead of staying on the same line as it's file name. Same happens
with my javascript onclick event, IE forces a line break and breaks my
code. In my asp code, you notice I'm inserting line breaks, but IE seems
to do what it wants. I should note, the below HTML results is actually 1
table of 40 or so that asp builds as a string.

I mention that because some tables get rendered without line breaks
following the 'jpg' and javascript code. My prolem is that when IE forces
line breaks as below, the code doesn' work.

Any ideas?

LISTING 1 - CODE

ColorInfo = ColorInfo & "<table border=0
background=""im ages/prints/thumb_" & RS10("choiceDat a1") & ".jpg""
style='border:s olid 1pt #000000' cellpadding=0 cellspacing=0>" & chr(13) &
chr(10)
ColorInfo = ColorInfo & "<tr><td>" & chr(13) & chr(10)
ColorInfo = ColorInfo & "<a href=""""
onclick=""javas cript:PW('pop_p rint.asp?print= " & RS10("choiceDat a1") &
"',310,400);ret urn false;"">" & chr(13) & chr(10)
ColorInfo = ColorInfo & "<img src=""images/filler.gif"" width=60
height=40 border=0></a>" & chr(13) & chr(10)
ColorInfo = ColorInfo & "</td></tr></table></tr>" & chr(13) & chr(10)
ColorInfo = ColorInfo & "<tr><td align=center><f ont
face=""verdana, sans-serif"" size=1>" & Replace(RS10("c hoiceName"),"
","<br>",1, 1) & "</font></td></tr></table></td>" & chr(13) & chr(10)
LISTING 2 - RESULTS

<table border=0 background="ima ges/prints/thumb_Abbey
.jpg" style='border:s olid 1pt #000000' cellpadding=0 cellspacing=0>
<tr><td>
<a href="" onclick="javasc ript:PW('pop_pr int.asp?print=A bbey
',310,400);retu rn false;">
<img src="images/filler.gif" width=60 height=40 border=0></a>
</td></tr></table>

Jul 22 '05 #2
I tried it, but as you see below, it had no effect. is there any way to
structure my below html so the NOWRAP will work for my problem? i see how it
works with regular text, but my case is a little different.

<table border=0><tr><t d NOWRAP align=center>
<table border=0 background="ima ges/prints/thumb_Abbey
..jpg" style='border:s olid 1pt #000000' cellpadding=0 cellspacing=0>
<tr><td NOWRAP><a href="" onclick="javasc ript:PW('pop_pr int.asp?print=A bbey
',310,400);retu rn false;">
<img src="images/filler.gif" width=60 height=40 border=0></a>
</td></tr></table></tr>
<tr><td align=center><f ont face="verdana,s ans-serif" size=1>Abbey<br >(AYSP)
</font></td></tr></table>
"Curt_C [MVP]" <software_AT_da rkfalz.com> wrote in message
news:uJ******** *****@TK2MSFTNG P12.phx.gbl...
put it in a Table Cell with NOWRAP on

--
Curt Christianson
Site & Scripts: http://www.Darkfalz.com
Blog: http://blog.Darkfalz.com
"scott" <sb*****@milesl umber.com> wrote in message
news:Ok******** *****@TK2MSFTNG P15.phx.gbl...
Is there a way to prevent IE from forcing a line break? Below in LISTING
2, you notice the table background image extention of '.jpg' begins a new
line, instead of staying on the same line as it's file name. Same happens
with my javascript onclick event, IE forces a line break and breaks my
code. In my asp code, you notice I'm inserting line breaks, but IE seems
to do what it wants. I should note, the below HTML results is actually 1
table of 40 or so that asp builds as a string.

I mention that because some tables get rendered without line breaks
following the 'jpg' and javascript code. My prolem is that when IE forces
line breaks as below, the code doesn' work.

Any ideas?

LISTING 1 - CODE

ColorInfo = ColorInfo & "<table border=0
background=""im ages/prints/thumb_" & RS10("choiceDat a1") & ".jpg""
style='border:s olid 1pt #000000' cellpadding=0 cellspacing=0>" & chr(13)
& chr(10)
ColorInfo = ColorInfo & "<tr><td>" & chr(13) & chr(10)
ColorInfo = ColorInfo & "<a href=""""
onclick=""javas cript:PW('pop_p rint.asp?print= " & RS10("choiceDat a1") &
"',310,400);ret urn false;"">" & chr(13) & chr(10)
ColorInfo = ColorInfo & "<img src=""images/filler.gif"" width=60
height=40 border=0></a>" & chr(13) & chr(10)
ColorInfo = ColorInfo & "</td></tr></table></tr>" & chr(13) & chr(10)
ColorInfo = ColorInfo & "<tr><td align=center><f ont
face=""verdana, sans-serif"" size=1>" & Replace(RS10("c hoiceName"),"
","<br>",1, 1) & "</font></td></tr></table></td>" & chr(13) & chr(10)
LISTING 2 - RESULTS

<table border=0 background="ima ges/prints/thumb_Abbey
.jpg" style='border:s olid 1pt #000000' cellpadding=0 cellspacing=0>
<tr><td>
<a href="" onclick="javasc ript:PW('pop_pr int.asp?print=A bbey
',310,400);retu rn false;">
<img src="images/filler.gif" width=60 height=40 border=0></a>
</td></tr></table>


Jul 22 '05 #3
scott wrote:
Is there a way to prevent IE from forcing a line break? Below in
LISTING 2, you notice the table background image extention of '.jpg'
begins a new line, instead of staying on the same line as it's file
name...

background=""im ages/prints/thumb_" & RS10("choiceDat a1") & ".jpg""

<table border=0 background="ima ges/prints/thumb_Abbey
.jpg" style='border:s olid 1pt #000000' cellpadding=0 cellspacing=0>


Are you certain the source does not contain the line break? Does this work
any better?

..." & Trim(RS10.Field s("choiceData1" ).Value) & ".jpg""

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jul 22 '05 #4
no go, i tried your code. It must be the way IIS renders it. at first, i
thought it was long field values, but it does it on 5 character values or
long ones.

i know there must be a solution, but i've exhausted all means.
"Dave Anderson" <GT**********@s pammotel.com> wrote in message
news:%2******** ********@tk2msf tngp13.phx.gbl. ..
scott wrote:
Is there a way to prevent IE from forcing a line break? Below in
LISTING 2, you notice the table background image extention of '.jpg'
begins a new line, instead of staying on the same line as it's file
name...

background=""im ages/prints/thumb_" & RS10("choiceDat a1") & ".jpg""

<table border=0 background="ima ges/prints/thumb_Abbey
.jpg" style='border:s olid 1pt #000000' cellpadding=0 cellspacing=0>


Are you certain the source does not contain the line break? Does this work
any better?

..." & Trim(RS10.Field s("choiceData1" ).Value) & ".jpg""

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message.
Use of this email address implies consent to these terms. Please do not
contact me directly or ask me to contact you directly for assistance. If
your question is worth asking, it's worth posting.

Jul 22 '05 #5
IIRC Trim will not remove linefeeds.

Try writing out Server.URLEncod e(RS10.Fields(" choiceData1").V alue) to see if
there is something else in the data.

I use similar code to build image urls all the time with no problems.

--
--Mark Schupp
"scott" <sb*****@milesl umber.com> wrote in message
news:%2******** ********@TK2MSF TNGP15.phx.gbl. ..
no go, i tried your code. It must be the way IIS renders it. at first, i
thought it was long field values, but it does it on 5 character values or
long ones.

i know there must be a solution, but i've exhausted all means.
"Dave Anderson" <GT**********@s pammotel.com> wrote in message
news:%2******** ********@tk2msf tngp13.phx.gbl. ..
scott wrote:
Is there a way to prevent IE from forcing a line break? Below in
LISTING 2, you notice the table background image extention of '.jpg'
begins a new line, instead of staying on the same line as it's file
name...

background=""im ages/prints/thumb_" & RS10("choiceDat a1") & ".jpg""

<table border=0 background="ima ges/prints/thumb_Abbey
.jpg" style='border:s olid 1pt #000000' cellpadding=0 cellspacing=0>


Are you certain the source does not contain the line break? Does this
work any better?

..." & Trim(RS10.Field s("choiceData1" ).Value) & ".jpg""

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message.
Use of this email address implies consent to these terms. Please do not
contact me directly or ask me to contact you directly for assistance. If
your question is worth asking, it's worth posting.


Jul 22 '05 #6
your server encode idea produced some interesting results. it still doesn't
work, but it maintained the filename. problem is it added %0D%OA as you can
see below. It only had that effect on certain records and there was no
pattern or sequence on which ones didn't work. it effected the same records
as before.

what coud be causing those characters?

<table border=0><tr><t d NOWRAP align=center>
<table border=0 background="ima ges/prints/thumb_Abbey%0D% 0A.jpg"
style='border:s olid 1pt #000000;margin: 0px;' cellpadding=0 cellspacing=0>
<tr><td NOWRAP><NOBR><a href=""
onclick="javasc ript:PW('pop_pr int.asp?print=A bbey
',310,400);retu rn false;"></NOBR>
<img src="images/filler.gif" width=60 height=40 border=0></a>
</td></tr></table></tr>
<tr><td align=center><f ont face="verdana,s ans-serif" size=1>Abbey<br >(AYSP)
</font></td></tr></table>
"Mark Schupp" <no******@email .net> wrote in message
news:%2******** ********@TK2MSF TNGP14.phx.gbl. ..
IIRC Trim will not remove linefeeds.

Try writing out Server.URLEncod e(RS10.Fields(" choiceData1").V alue) to see
if there is something else in the data.

I use similar code to build image urls all the time with no problems.

--
--Mark Schupp
"scott" <sb*****@milesl umber.com> wrote in message
news:%2******** ********@TK2MSF TNGP15.phx.gbl. ..
no go, i tried your code. It must be the way IIS renders it. at first, i
thought it was long field values, but it does it on 5 character values or
long ones.

i know there must be a solution, but i've exhausted all means.
"Dave Anderson" <GT**********@s pammotel.com> wrote in message
news:%2******** ********@tk2msf tngp13.phx.gbl. ..
scott wrote:
Is there a way to prevent IE from forcing a line break? Below in
LISTING 2, you notice the table background image extention of '.jpg'
begins a new line, instead of staying on the same line as it's file
name...

background=""im ages/prints/thumb_" & RS10("choiceDat a1") & ".jpg""

<table border=0 background="ima ges/prints/thumb_Abbey
.jpg" style='border:s olid 1pt #000000' cellpadding=0 cellspacing=0>

Are you certain the source does not contain the line break? Does this
work any better?

..." & Trim(RS10.Field s("choiceData1" ).Value) & ".jpg""

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message.
Use of this email address implies consent to these terms. Please do not
contact me directly or ask me to contact you directly for assistance. If
your question is worth asking, it's worth posting.



Jul 22 '05 #7
"scott" wrote:
your server encode idea produced some interesting results. it
still doesn't work, but it maintained the filename. problem is
it added %0D%OA as you can see below. It only had that effect
on certain records and there was no pattern or sequence on
which ones didn't work. it effected the same records as before.

what coud be causing those characters?


They are clearly in the database.

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
Jul 22 '05 #8

what coud be causing those characters?


They are clearly in the database.

try replace (RS10.Fields("c hoiceData1").Va lue, vbcrlf, "") ?
Jul 22 '05 #9
&nbsp;

instead of just normal spaces

can cause trouble as well

"Giles" <Gi***@NoSpam.c om> wrote in message
news:%2******** ********@TK2MSF TNGP12.phx.gbl. ..

what coud be causing those characters?


They are clearly in the database.

try replace (RS10.Fields("c hoiceData1").Va lue, vbcrlf, "") ?

Jul 22 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2474
by: Alex Dribin | last post by:
Hi, Are there ready solutions for auto-wrapping lines in ostream? I am using ostream for output and want this output to be wrapped at some position. Of course I can monitor stream pointer position and insert end-of-lines periodically. Something better than that? Alex
11
6088
by: name | last post by:
Here is a first attempt at a line/word wrapping utility. Seems to work okay, but lacks some checking stuff, etc. --------------------------------------------------------- #include <stdio.h> #include <stdlib.h> #include <string.h> #include <limits.h>
4
2807
by: Brian Gideon | last post by:
All, I want to know how others deal with long lines of code. Do you care? If so, what rule(s) do you follow? Is it important to you how it looks on printed paper or displayed on the screen? Being able to keep all of the code on the screen without scrolling horizontally is important to me, but the 80 character rule is limiting and outdated and anything else seems arbitrary considering that different developers use different screen...
1
1771
by: mg | last post by:
I set the width of a WebForm Label but do not get line wrapping (see below). What can I do to get line wrapping WebForm1.asp <asp:Labe id="Label1" style="Z-INDEX: 101; LEFT: 40px; POSITION: absolute; TOP: 48px runat="server" Width="150px" Height="64px"></asp:Label
2
2651
by: Amelyan | last post by:
If I have spaces in my Text property of Label, and I add it to TableCell, it wraps at spaces. E.g. Label lb = new Label(); lb.Text = "Hello, World!" TableCell cell = new TableCell(); cell.Controls.Add(lb); The resulting TableCell html render will look like this
6
1165
by: Markus Ernst | last post by:
Hi Searching for a possibility to display some text with preserved white space and line breaks, but with long lines being wrapped, I found this CSS declaration, which I found helpful: pre { white-space: pre-wrap; /* css-3 */ white-space: -moz-pre-wrap; /* Mozilla, since 1999 */ white-space: -pre-wrap; /* Opera 4-6 */
5
6417
by: Jason | last post by:
I have a div box with a border, and some padding left and right. It has some text with different font sizes, and a few icons. I want to cut off any overflow at the end of the line with "...", instead of the text wrapping. What is the best way I can detect whether the line wrapped, and how many characters to cut off at the end? - Jason
7
2450
by: John den Haan | last post by:
Hello! When I use putchar to fill up an entire screen (of 80x25) with text, it seems to leave an empty line at the end, thus forcing me to scroll upwards in to see the first line. This forces me to repositioning the cursor to the first line, which costs computer power. I know the loss is negligible, but it's more a matter of principle: how to prevent this line-wrapping behaviour? --
10
6985
by: marss | last post by:
<hr style="height:1px"/does not fit because although a line looks like it has 1 pixel with but there are empty spaces above and below line. It can be seen if place two HR elements beside. <hr style="height:1px"/> <hr style="height:1px"/> I tried also <div style="height:1px;font-size:1px;background- color:black;"></divbut a line was 2 pixel thick :(
4
2026
by: elukkien | last post by:
Hello! I'm trying to find a way to print out a long string (>400 characters no spaces, tabs or newlines) to a line width of 60 characters. So after every 60 characters a newline would start. Is it possible to transform the string to set the linewidth? for example for a linewidth of 2:
0
9945
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9798
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11160
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10766
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10422
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7978
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6007
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4622
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4230
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.