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.

Example 9-16 getEmailAddress functionfunction getEmailAddress(name){return emailAddress[name];}Closing the menuThe only thing left to do now is to make sure that the menu is closed. Like anyother menu, our menu needs to be closed when a menu item is selected or themouse is clicked outside the menu area. In Example 9-17, we add a hideMenufunction that hides the tag when the menu needs to be closed.Example 9-17 hideMenu functionfunction hideMenu(){document.getElementById("menu").style.visibility='hidden';}How does hideMenu get called? The simplest way is to call it in the onClickattribute of the page’s tag:Alternatively, if you do not want to change the tag, you can set theonClick action with JavaScript by adding the code in Example 9-18 anywhere inthe page.Example 9-18 onClick actiondocument.onclick = hideMenu;How to use the sample pageDetails on how to obtain this sample code are available in Appendix C,“Additional material” on page 467. The sample is based on one of the samplepages provided with the Sametime Links Toolkit. The original sampledemonstrates how Sametime Links can be embedded in a message board page.For this section, we enhanced the page with our sample menu. Do not try to runthe sample that way. It contains placeholders for the server address and peoplenames that you have to complete before you can run it. The following steps willtake you through the necessary process to make the sample work within yourenvironment:Chapter 9. Sametime Links 269

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

Saved successfully!

Ooh no, something went wrong!