Contents tagged with Javascript
-
Remaining Characters Counter
Recently I was developing a webform (asp.net) where the user could submit his feedback, and one of the requirements was that the user should not enter more than a set number of characters in his message, so I thought it would be real nice for the end user to know how many more characters he still can type until the maximum limit is reached.
In order to allow that functionality, I created a asp.net multiline textbox for text input and an html readonly text field (for displaying number of characters until the maximum).
Then, I created a Javascript function and called it every time the contents of the multiline textbox changed (onKeyUp and onChange events).
Below is the code:
<html>
<head>
<script language="JavaScript">