10.07.2015 Views

Lotus Instant Messaging/ Web Conferencing ... - IBM Redbooks

Lotus Instant Messaging/ Web Conferencing ... - IBM Redbooks

Lotus Instant Messaging/ Web Conferencing ... - IBM Redbooks

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

The stlinksAppletIsUp function in Example 9-5 on page 258 are called when theSametime Links applet is loaded and active within the chat window. If we were totry and use the Sametime Links applet before it was loaded, you would receive aJava error. To avoid that error, we want to place our code to send a message tothe bot within this function. To do this, we literally have to add one line:sendText('');We will add this line right before the end of the function, as seen in Example 9-6.Example 9-6 Modified stlinksAppletIsUp functionfunction stlinksAppletIsUp(){stlinksAppIsUp = true;chatEnabled = true;if (inputAppIsUp)getInputApplet().setEnabled(true);sendText('');}This function sends an empty string via the sendText function to the SametimeBot. In a real world situation, you would modify your bot code to handle receivingan empty string from Sametime Links clients so that it does not respond withsearch results the first time it is called.9.7 Adding menu options to Sametime LinksWhen people deploy Sametime Links, they often find they want to add extrafeatures to the live names they are displaying on a page. Since Sametime Linksis built around a collection of JavaScript and HTML, it is very flexible for allowingthis kind of customization. In this section, we will give an example of customizingthe live names to allow you to send e-mail to an offline person, share anapplication, and add the name of the person to your contact list. Overriding thedefault Sametime Links click behavior, we will display a pop-up menu usingdynamic HTML and the Sametime Links JavaScript API.Note: The content and samples for this section were adapted from “Adding aPopup Menu to your Sametime Links” by Haim Schneider in LDD Today, July2003. To reference the original article, see the following URL:http://www.lotus.com/ldd/today.nsf/lookup/ST_popupTo access the The <strong>Lotus</strong> Developer Domain (LDD), visit:http://www.lotus.com/lddChapter 9. Sametime Links 259

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!