I am writing a application that sends SMS messages, the maximum number of characters that I can send is 612. I have two textboxes, charsLeft and messageNumber, into which I place the number of characters remaining, and the number of actual SMS messages that the users messages will be divided into.
I am using javascript to carry out my calculations using the onKeyUp event of the textarea, this means that the calculations are carried out everytime the user presses a key.
A problem arises if the user spots an error in their message and attempts to correct it. When they start typing in the middle of the message text, the first character will be displayed at the correct location, but the next character will be displayed at the end of the text in the textarea as the cursor hops to the very end after the text is typed.
Does anyone know of any control/technique that can allow me to stop this from happening.
Mike55.
I am using javascript to carry out my calculations using the onKeyUp event of the textarea, this means that the calculations are carried out everytime the user presses a key.
A problem arises if the user spots an error in their message and attempts to correct it. When they start typing in the middle of the message text, the first character will be displayed at the correct location, but the next character will be displayed at the end of the text in the textarea as the cursor hops to the very end after the text is typed.
Does anyone know of any control/technique that can allow me to stop this from happening.
Mike55.