Solved

Wrap text problem

Posted on 2008-06-10
5
471 Views
Last Modified: 2008-06-18
Hello Experts.
I have a problem in design view when i have a dynamic text output like:
uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu.
That's why i did use a code to wrap the text above(if somebody want's to make only a joke ):
<tr><td colspan="2"  height="500" width="240">
<cfset limit = 30>
<cfloop condition="REFindNoCase('\S{#limit+1#}',qVerg.Description)">
<cfset qVerg.Description = Insert(" ",qVerg.Description,REFindNoCase('\S{#limit+1#}',qVerg.Description)+limit-1)>
          </cfloop>
                                          <cfoutput>#qVerg.Description#</cfoutput>
</td></tr>
I don't know why but the code is not working and the text don't wrap.
That what i really want is that i don't want more than 30 characters in 1 line.
Any help?
0
Comment
Question by:Panos
  • 3
5 Comments
 
LVL 6

Expert Comment

by:JapyDooge
ID: 21750726
maybe you can output it in a textarea.

this will have a fixed size. no wordwrap but scrollbars.

or a fixed div with scrollbars
0
 
LVL 2

Author Comment

by:Panos
ID: 21750848
Hello JapyDooge.
Thank you for help but i prefer something that don't allows more that 30 characters in one line.
I have allready tried to do this with textarea but i don't like the result in design.
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 21751067

<table>
<tr><td colspan="2" style="height:500px; width:240px;"> 
<span style="width:100%; overflow:scroll">
I have a problem in design view when i have a dynamic text output like:
uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu.uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu.uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu.uuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu.
That's why i did use a code to wrap the text above(if somebody want's to make only a joke ):
</span></td></tr></table>

Open in new window

0
 
LVL 2

Author Comment

by:Panos
ID: 21751247
Hi mplungjan
This code :<tr><td colspan="2"  height="500" width="240">
<span style="width:100%; overflow:scroll">
<cfoutput>#qVerg.Description#</cfoutput></span>
</td>
has for me no result.
The mistery is that the same code (the first in the question) is wopking for me in another page.
0
 
LVL 2

Accepted Solution

by:
Panos earned 0 total points
ID: 21751323
Hi again.
I found the problem
The ... <cfoutput>#qVerg.Description#</cfoutput>....was in a <cfoutput query.....>  ....</cfoutput>and it was not working .Now i deleted the <cfoutput> and </cfoutput> and it is working:
<cfoutput query.................................>
<cfset limit = 30>
<cfloop condition="REFindNoCase('\S{#limit+1#}',qVerg.Description)">
<cfset qVerg.Description = Insert(" ",qVerg.Description,REFindNoCase('\S{#limit+1#}',qVerg.Description)+limit-1)>
          </cfloop>
                                          #qVerg.Description#.....................................<cfoutput>
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Sometimes databases have MILLIONS of records and we need a way to quickly query that table to return the results me need. Sure you could use CFQUERY but it takes too long when there are millions of records. That is why SOLR was invented. Please …
When writing CSS, there are a few simple rules that will make your life easier.    1. Using ‘* {box-sizing:border-box;}’. Using this will wrap all your elements in a nice little compact box-model that will give you the width you want, like so... …
In this tutorial viewers will learn how to define a gradient in CSS. Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Gradient. Define the background as "linear-gradient(to right, #ee3668, black)". Ensure you …
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question