Jump to content
xisto Community
Sign in to follow this  
alexia

Counting Characters Of Textarea...

Recommended Posts

good day webmasters...i am in need of a script that will count the inputted characters one will enter... i mean the script must count the number of characters in a textarea as i am entering characters to the textarea..i know the logic but i cant translate it yet in PHP... so i hope you can help me...thanks a lot in advance... :rolleyes:

Share this post


Link to post
Share on other sites

yes,it must be a very simple php script ..i just learning php but i just can not answer it for you.you see,that,your way of using php is not a normal way.i just didn't meet it before.Good luck.Guangdian

Share this post


Link to post
Share on other sites

There is a PHP function that counts the number of characters in a string: strlen($variable_to_count);

 

I am not sure how you could use this 'live'. If anyone could enlighten me, guangdian and alexia on how to include this 'live' we would be very greatful.

Share this post


Link to post
Share on other sites

First of all, if your going to attempt to halt further character inputs, there's a much easier way (maxlength="").

 

as for your "real-time length-check"..:

link

 

It's a long page, but just scroll to the bottom (Header="Real-time" JavaScript check)

 

Hope this helps..

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.