Hi everybody,
I would like to extend the mail-application with a simple function, that shows me the number of characters I already have typed in.
An example would be, sending a message to a SMS-gateway and you want to know if you are still in the 160 character limit per SMS.
I was looking at the mail-database, but the mail-editor seems to be a closed module, so I do not get these informations from there.
An other idea would be accessing this information via the automatic spellchecker that is running all the time when you write the message.
Any idea how to do this?
Thanks a lot,
Thorolf
Subject: Counting characters in mail while writing a message
Hi all,
I’m a big step ahead with my problem, because it is possible to count the characters in the Body-field of the Memo-form with some JavaScript:
Form - Memo:
CharCount #
Body - onFocus:
useClick = window.setInterval( “runCount()”, 100 );
Body - onBlur:
window.clearInterval(useClick);
Memo JS-Header:
var useClick;
var bodyText;
var bodyTextLen;
function runCount() {
bodyText = document.forms[0].Body.value;
bodyTextLen = bodyText.length;
document.forms[0].CharCount.value = bodyTextLen;
}
So with this solution I am able to count the characters in my e-mail.
I placed the “CharCount”-field directly over the “Body”-field, but this position has the big disadvantage, that the field scrolls up if the e-mail gets longer.
So I tried to place the “CharCount”-field under the header, where it stays while I’m scrolling.
Unfortunately I get an error: “ToObjectError: documents.forms[0].CharCount has no properties” 
How do I reference this field correctly when I move it under the header?
Thanks a lot,
Thorolf