Solved

Character count in notes client

Posted on 2003-11-17
3
870 Views
Last Modified: 2013-12-18
Hi,
  I am new to lotus notes. we are developing a mobile application in lotus notes. I want to implement character counter in  notes client. That is as and when the user types I want to show him the number of characters he has typed dynamically. How can I implement this. This is the most important requirement and I have no escape. I know it is possible in web client. But I want to do this in notes client. I have seen the similar functionality in domino designer that is as and when I type the code it shows the column and row count. Are there atleast any DLL's to do this using C API if not lotusscript or formula language.This is urgent. Experts please help.

I will tell you how I have impletented it now I have included the following code in onBlur and onFocus events:
var CharacterCount=0;
CharacterCount += RtBody.value.length;
var NumMsgs = 1;
if (CharacterCount > 160 )
{
NumMsgs =CharacterCount / 160;
NumMsgs=NumMsgs+1;
}
window.status="Charater Counter     "+CharacterCount +"(" + parseInt(NumMsgs) +")";

But this does not serve my purpose.
Any quick exact help will be very greatful

Thanks in advance.
rishi.
0
Comment
Question by:rishi_vino
3 Comments
 
LVL 19

Expert Comment

by:madheeswar
ID: 9769481
As per I know its not going to be an easy task. And may not possible also.

Anyway I will check is thier anything possible in any method.

Wait for other experts.
0
 

Author Comment

by:rishi_vino
ID: 9769774
Thanks for your quick response

0
 
LVL 46

Accepted Solution

by:
Sjef Bosman earned 100 total points
ID: 9769812
It seems to me that you are going to transfer data over an SMS service. Without a proper protocol this is a dangerous thing, since how would you know that you missed some packets? But that's for you to think about. I hope you are going to use some of-the-shelf software for datacommunication.

I never managed to get onBlur and onFocus properly working in the Notes-client, but if they work that's great. Probably best is to do this with a NotesTimer, or a setTimeout in JavaScript although I don't know if the latter can be used in the Notes client.

In LotusScript (untested):

In a global declarations section:
   Dim nt As NotesTimer
   Dim counter As NotesItem
   Dim uidoc As NotesUIDocument

In the PostOpen:
   Set counter= Source.Document.getfirstitem("CharacterCount") ' put the name of the field in here
   Set uidoc= Source ' make source global
   Set nt= New NotesTimer(1) ' one second interval
   On Event Alarm From nt Call UpdateCount

Define a sub:
Sub UpdateCount(src As NotesTimer)
   Call counter.replaceitemvalue(Len(uidoc.fieldgettext("Body"))) ' hope this works...
End Sub
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For beginners of Lotus Notes user this is important to know about the types of files and their location supported by IBM Notes. Mostly users are unaware about how many file types are created and what their usages are. This Article is fully dedicated…
IBM Notes offer Encryption feature using which the user can secure its NSF emails or entire database easily. In this section we will discuss about the process to Encrypt Incoming and Outgoing Mails in depth.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question