Word Counters

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I would like to make a word counter available to clients when I give them a limit of how much information they can include in a text box in a form. Is this Java? Does anyone know some code I can use to accomplish this (and where to put it)?
 
Hi,
You could do something like this

<textarea onkeyup="if(this.value.split(' ').length>5)alert('5 words max');"

Change 5 to the number of words you want - and obviously modify the message
to suit

Jon
Microsoft MVP - FP
 
You can do this in Frontpage to a limited extent (although you specify number of
characters, not words as such).

Right-click the field and set the "field length" to a min of 1 character (if you
"require" the field to be filled in by the user) and/or a maximum number to your
requirements.


Not So Green said:
I would like to make a word counter available to clients when I give them a
limit of how much information they can include in a text box in a form. Is this
Java? Does anyone know some code I can use to accomplish this (and where to put
it)?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top