Ask a Question related to Coldfusion - Getting Started, Design and Development.
-
sattman #1
Show first 25 characters or so of textarea
I want to do something you see all the time in forums, show a short bit of the
textarea followed by .... and linked to show the whole thread I can do the
linking part no prob, how do you show a limited amount of a text area followed
by the ......?
thanks
sattman Guest
-
problems with some characters in TEXTAREA
Hello all, When characters like " are used in a textarea-field the content of the form is not exactly what you expect from it. When you want to... -
Special Characters in Flash don't show in Director
I have created a Flash movie in Flash MX and imported it into Director 8.5. There are some special characters in the movie, for spanish text, that... -
Removing carriage returns from <textarea></textarea> input
Hiya, I have a form with a <textarea></textarea> to receive user input. This input is then stored in a database and sent by fax... I need to... -
Textarea - Limit Amount of Characters?
"Ralph Freshour" <ralph@primemail.com> wrote in message news:cr6bkvc5rsi9o355ff50c7746iu0omq6kk@4ax.com... I suspect *limiting* the amount of... -
Is there a way to only allow a textarea to hold a certain # of characters?
Is there a way to only allow a text area to hold a certain amount of characters? What I mean by this, is when you type in it, it will only allow... -
Dan Bracuk #2
Re: Show first 25 characters or so of textarea
With the left function followed by the periods and question mark.
Originally posted by: sattman
I want to do something you see all the time in forums, show a short bit of
the textarea followed by .... and linked to show the whole thread I can do the
linking part no prob, how do you show a limited amount of a text area followed
by the ......?
thanks
Dan Bracuk Guest
-
mxstu #3
Re: Show first 25 characters or so of textarea
sattman,
You might be interested in the FullLeft() udf at cflib.org. It uses regular
expressions to find whole words which is typically more efficient than looping.
The example below would produce the output:
Today's date is November 6, 2005. The ...
<!--- include the UDF --->
<cfinclude template="fullLeft.cfm">
<cfset shortText = fullLeft(fullText, 40)>
<cfoutput>#shortText#</cfoutput>
<cfif len(shortText) lt len(fullText)>...</cfif>
mxstu Guest



Reply With Quote

