SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 4 of 4
  1. #1
    Junior Member
    Join Date
    May 2006
    Posts
    6
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    How to count characters in a text field

    I enter 5200 characters in a text field and continue and go to a page where it displays all the data entered and it is supposed to display the message only upto 2000 character. How do I check this??

    --thanks in advance,
    vpeerapur

  2. #2
    Senior Member
    Join Date
    Mar 2003
    Location
    Petaluma, CA, US
    Posts
    126
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to count characters in a text field

    You can use gettext and Len function as below, is this what you mean?

    string s = textfield.GetText();
    if (Len(s) == 2000)
    pass
    else
    fail

    thanks
    joe

  3. #3
    Junior Member
    Join Date
    May 2006
    Posts
    6
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to count characters in a text field

    thanks for the fast response.I am having this string in different lines, If I use gettext it only returns the first line. I tried getcontents which returns all lines in an array. I could count individual lines. Isn't there an easy way to do this??

    --vpeerapur

  4. #4
    Member
    Join Date
    Feb 2005
    Location
    Bangalore, India
    Posts
    303
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: How to count characters in a text field

    have u tried getmultitext?

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 10.71%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 06:07 AM.

Copyright BetaSoft Inc.