Solved

Character count in notes client

Posted on 2003-11-17
3
859 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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

You’ve got a lotus Domino web server, and you have been told that “leverage browser caching” is a must do. This means that we have to tell the browser everywhere in the web to use cache. In other words, we set (and send) an expiration date in the HT…
Notes Document Link used by IBM Notes is a link file which aids in the sharing of links to documents in email and webpages. The posts describe the importance and steps to create a Lotus Notes NDL file in brief.
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…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

760 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now