textbox or textarea change font color based on character count
I want to implement a text input box for SMS text messages and the messages are limited to 160 characters (including spaces, etc.). I would like the font color of the text to be green as the user types and any text beyond 160 characters to be red. I would like to do this with one input box, the same box that the user is typing in not a separate display box. This will be on the users local PC it won't be on the Internet.
Does anyone have any ideas or know of a solution?
Thanks for the code you got me pointed in the right direction. I need to show the text that is 160 characters and under in green and the text over 160 characters in red. Below is what I have so far, it more or less works correctly but the formatting is ugly. Is it possible for the text in the textarea box to get replaced with the green/red text? Or, if not, does anyone have any ideas for making the red/green text look better, maybe forcing it to display to the right of the textarea input box?
Thanks for your help, support, knowledge and expertise.
Bookmarks