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.

contents are shown in Example 9-10. You can place the menu taganywhere in your page. Its initially hidden because it uses the stMenu style,which has a visibility: hidden attribute.Example 9-10 Menu table definitionThe menu is initially empty. As you can see in Example 9-10, there are four tablecells for the four menu items, but these cells are empty. The cells are dynamicallypopulated when the menu is opened. This allows us to enable or disable themenu items according to the online status and to create the Send Mail menu itemwith the e-mail address of the selected person.The setMenuItem function in Example 9-11 sets the content of a single menuitem.Example 9-11 setMenuItem functionfunction setMenuItem(itemId, text, action, isEnabled){var menuItem = document.getElementById(itemId);//add spaces to the left of the texttext = "&nbsp " + text;if (isEnabled)menuItem.innerHTML = "" + text +"";else menuItem.innerHTML = "" + text + "";}The ID of the table cell (the tag) is used to access the item. SetMenuItempopulates the cell with the menu item content. An enabled item is displayed asan HTML link with the action specified in the action parameter. The action iseither a JavaScript URL or a mailto: link. A disabled item is displayed as plaintext, using the menuDisabled style, which we defined in Example 9-11 onpage 265.Now let us look at the showMenu function in Example 9-12.Example 9-12 showMenu functionChapter 9. Sametime Links 265

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

Saved successfully!

Ooh no, something went wrong!