Keystroke Count

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
 
M

Marina

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.
 
J

Jerry III

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
 
W

Will T

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


.
 

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

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,902
Latest member
Elena68X5

Latest Threads

Top