Wrap text in table row.

Hallo experts.
In a table row i get text from a recordset like
<tr>
  <td><cfoutput>#dboartikel.Test#</cfoutput></td>
</tr>
what must i do so that every 80 letters the text will wrap?
And if the text is 400 letters  what must i do if i want only the 200 of it an the rest as (....).
The numbers i used are only for understanding the question.The answer can be in pixels or anything.
thx
panos
LVL 2
PanosAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

yo_s_cantaCommented:
Split text in 80 chars lines:
<tr>
  <td><cfoutput>#Wrap(dboartikel.Test,80)#</cfoutput></td>
</tr>
Warp just 80 chars:
<tr>
  <td><cfoutput>#Wrap(dboartikel.Test,80,true)#</cfoutput></td>
</tr>

Have a nice day,
Andrew
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
PanosAuthor Commented:
Hallo Andrew.
Testing your code i have a result like this:
Taxi,Behindertengerecht,ABS,Parkhilfe,Airbag,Regen
sensor,Beifahrerairbag,Elektr. Fenster
vorne,Seitenairbag,Elektr. Fenster
hinten,Traktionkontroll,ESP,DVD,Nebelscheinwerfer
,Radiokassete.

Do you know why or is this normal?
How can i split the text (the second question)?
(Show only a part of the text for example 100 char and for the rest this [.....]
thx
Panos
0
yo_s_cantaCommented:
Look here http://livedocs.adobe.com/coldfusion/6.1/htmldocs/funca119.htm 
You can do the wrap with css also. like this
<table width="100%">  
<tr>
<td width="180" style="overflow: hidden;">#(test)#</td>
<td width="180" style="overflow: scroll;">#(test2)#</td>
<td width="180" style="white-space: nowrap;">#(test3)#</td>
<td width="180" style="word-wrap: break-word;">#(test4)#</td>
</tr>
</table>
For the 2nd question use : Wrap(dboartikel.Test,80,true)      (true turn strip on)
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

PanosAuthor Commented:
Hallo Andrew.
Thank you for your help.
I didn't get it with CSS but with the first solution it is OK.
Please help me a bit more with the second question if you want.
This is the text i have now:
<td width="60">#Wrap(dboartikel.Besonderheiten,40,true)#</td>.
I want only two lines of text and on the [...].
I did see the link you gave me but my english is not so good to understand the function.
regards
panos
0
yo_s_cantaCommented:
There is a function Mid(string, start, count)
<td>#Mid(dboartikel.Besonderheiten,1,60)#</td>
0
PanosAuthor Commented:
Hallo Andrew
With the Mid function i have an cfoutput text from the first(1) to the 60 character on one line.
I need only two lines of text and on the end like this [...].
regards
panos
0
PanosAuthor Commented:
Hallo again.
Is there any function with Wrap...... and Max char?
without the [....] in the end?
Because i get these values form a column with a number off text that i did get from a checkbox group
can i have an output with wrap and max text(words)?
0
yo_s_cantaCommented:
I do not understand
0
PanosAuthor Commented:
I will try again to explain it to you.
I show you two result pages of car search engines.
1.
http://suchen.mobile.de/fahrzeuge/search.html?isSearchRequest=true&scopeId=C&country=&negativeFeatures=EXPORT&lang=de&sortOption.sortBy=price.consumerGrossEuro&sortOption.sortOrder=ASCENDING&makeModelVariant1.makeId=1900&makeModelVariant1.modelId=9&maxPrice=&minFirstRegistrationDate=2008-01-01&maxMileage=&fuel=&zipcode=&zipcodeRadius=&doSearch.x=57&doSearch.y=9
2.
http://autoscout24.de/List.aspx?vis=1&make=9&model=1626&fregfrom=01%2f01%2f2008+00%3a00%3a00&fregto=12%2f31%2f2008+00%3a00%3a00&pricefrom=1000&cy=D&page=1&maxresults=500&results=20&um=True&sort=price&zipc=D
On the first page the last line of each result is what has been inserted in one column from a check box group but it has a limit of words in the output on the page on one line only.
In the second page the results are on two pages with a limit of words and if there is more of it it has this (... » )
.
I hope you can understand it now.
regards panos
0
PanosAuthor Commented:
sorry
......on two lines....
i mean
0
yo_s_cantaCommented:
<cfset inputText=Mid(dboartikel.Besonderheiten,1,60)>
<cfoutput>#Wrap(inputText, 59)#</cfoutput>

P.S. I don't work with coldfusion , I just searched on google
Hope that work
0
PanosAuthor Commented:
Thank you Andrew.
I will make a new question for my second question.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Dreamweaver

From novice to tech pro — start learning today.