I have an eventhandler function for a textbox, that does the following,
- Searches the contacts of the user and displays, the contacts that matches the pattern
of the textbox
The same function should be done for two more textboxes.
Since the value of the textbox is obtained using “e.parameter.textbox1NAME”, I have added two more functions as event handlers,
textbox2.addKeyUpHandler('search2');
textbox3.addKeyUpHandler('search3');
in addition to
textbox1.addKeyUpHandler('search1');
The only difference among the three functions is whether the pattern used is,
“e.parameter.textbox1NAME” or “e.parameter.textbox2NAME” or “e.parameter.textbox3NAME”
I think this is inefficient, is there any way to know which element invokes the handler or which element is in focus?
Thanks
Srik answer is very smart ! I liked it and wanted to give it a try… here is an example to illustrate !