#shortText# ... [allowsmilie] => 1 [showsignature] => 0 [ipaddress] => [iconid] => 0 [visible] => 1 [attach] => 0 [infraction] => 0 [reportthreadid] => 0 [isusenetpost] => 1 [msgid] => [ref] => [htmlstate] => on_nl2br [postusername] => mxstu [ip] => webforumsuser@m [isdeleted] => 0 [usergroupid] => [membergroupids] => [displaygroupid] => [password] => [passworddate] => [email] => [styleid] => [parentemail] => [homepage] => [icq] => [aim] => [yahoo] => [msn] => [skype] => [showvbcode] => [showbirthday] => [usertitle] => [customtitle] => [joindate] => [daysprune] => [lastvisit] => [lastactivity] => [lastpost] => [lastpostid] => [posts] => [reputation] => [reputationlevelid] => [timezoneoffset] => [pmpopup] => [avatarid] => [avatarrevision] => [profilepicrevision] => [sigpicrevision] => [options] => [akvbghsfs_optionsfield] => [birthday] => [birthday_search] => [maxposts] => [startofweek] => [referrerid] => [languageid] => [emailstamp] => [threadedmode] => [autosubscribe] => [pmtotal] => [pmunread] => [salt] => [ipoints] => [infractions] => [warnings] => [infractiongroupids] => [infractiongroupid] => [adminoptions] => [profilevisits] => [friendcount] => [friendreqcount] => [vmunreadcount] => [vmmoderatedcount] => [socgroupinvitecount] => [socgroupreqcount] => [pcunreadcount] => [pcmoderatedcount] => [gmmoderatedcount] => [assetposthash] => [fbuserid] => [fbjoindate] => [fbname] => [logintype] => [fbaccesstoken] => [newrepcount] => [vbseo_likes_in] => [vbseo_likes_out] => [vbseo_likes_unread] => [temp] => [field1] => [field2] => [field3] => [field4] => [field5] => [subfolders] => [pmfolders] => [buddylist] => [ignorelist] => [signature] => [searchprefs] => [rank] => [icontitle] => [iconpath] => [avatarpath] => [hascustomavatar] => 0 [avatardateline] => [avwidth] => [avheight] => [edit_userid] => [edit_username] => [edit_dateline] => [edit_reason] => [hashistory] => [pagetext_html] => [hasimages] => [signatureparsed] => [sighasimages] => [sigpic] => [sigpicdateline] => [sigpicwidth] => [sigpicheight] => [postcount] => 3 [islastshown] => 1 [isfirstshown] => [attachments] => [allattachments] => ) --> Show first 25 characters or so of textarea - Coldfusion - Getting Started

Show first 25 characters or so of textarea - Coldfusion - Getting Started

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

  1. #1

    Default 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

  2. #2

    Default 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

  3. #3

    Default 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

Similar Threads

  1. problems with some characters in TEXTAREA
    By alpenman in forum Macromedia ColdFusion
    Replies: 8
    Last Post: March 1st, 12:05 AM
  2. Special Characters in Flash don't show in Director
    By Crainford in forum Macromedia Director Basics
    Replies: 0
    Last Post: November 7th, 08:28 PM
  3. Replies: 1
    Last Post: September 10th, 04:55 AM
  4. Textarea - Limit Amount of Characters?
    By Richard Hockey in forum PHP Development
    Replies: 2
    Last Post: August 23rd, 04:34 AM
  5. Is there a way to only allow a textarea to hold a certain # of characters?
    By mherchel webforumsuser@macromedia.com in forum Macromedia Dreamweaver
    Replies: 3
    Last Post: July 17th, 04:00 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •