Keystroke Count

  • Thread starter Thread starter Herb Stull
  • Start date Start date
H

Herb Stull

Does anyone know of a way to count keystrokes client side? My users want to
know how many characters they've typed into a textbox. Picky, picky, picky!

Thanks, Herb
 
I would recommend just checking the number of characters in the textbox, as
opposed to counting what they type as they go along, if all you need to know
are the number of characters.
 
Even better: document.forms["formname"].elements["fieldname"].value.length

Jerry

Vidar Petursson said:
Hi

document.forms["FORMNAME"].FIELDNAME.value.length

--
Best Regards
Vidar Petursson
==============================
Microsoft Scripting MVP
http://www.microsoft.com/technet/scriptcenter
==============================
Herb Stull said:
Does anyone know of a way to count keystrokes client side? My users want to
know how many characters they've typed into a textbox. Picky, picky, picky!

Thanks, Herb
 
Can the object referenced in
document.forms["FORMNAME"].FIELDNAME.value.length
be an "<asp:TextBox..."?

I seem to only be able to reference HTML objects.

Thanks
-----Original Message-----
Even better: document.forms["formname"].elements ["fieldname"].value.length

Jerry

Vidar Petursson said:
Hi

document.forms["FORMNAME"].FIELDNAME.value.length

--
Best Regards
Vidar Petursson
==============================
Microsoft Scripting MVP
http://www.microsoft.com/technet/scriptcenter
==============================
Herb Stull said:
Does anyone know of a way to count keystrokes client
side? My users want
to
know how many characters they've typed into a
textbox. Picky, picky,
picky!
Thanks, Herb


.
 
Back
Top