Solved

Character count in notes client

Posted on 2003-11-17
3
880 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

For Desktop Techs: How to retain a user's Notes configuration data when swapping out the end user's computer. (Assuming that you are not upgrading to a completely different version of Notes client) All you need to do is: 1) install Notes o…
  In today’s Arena we can’t imagine our lives without Internet as we are highly used to of it. If we consider our life style just for only 2 min we found that face to face communication is swapped by e-communication.  Every Where from Works place to…
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…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

705 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