Counting User Text

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
pgoroncy
Forum Newbie
Posts: 1
Joined: Tue May 23, 2006 1:23 am

Counting User Text

Post by pgoroncy »

What I am trying to do is have the user enter text into a form and then count the number of words in the text they have entered. I know this is probably simple to do, but I just haven't been able to figure it out.
User avatar
neogeek
Forum Newbie
Posts: 24
Joined: Sun May 14, 2006 4:24 am

Post by neogeek »

Code: Select all

<textarea onkeyup="window.status = 'Words: ' + value.split(' ').length;"></textarea>
Hope that helps.
Post Reply