
Chapter 9. Sametime Links 269
Example 9-16 getEmailAddress function
function getEmailAddress(name)
{
return emailAddress[name];
}
Closing the menu
The only thing left to do now is to make sure that the menu is closed. Like any
other menu, our menu needs to be closed when a menu item is selected or the
mouse is clicked outside the menu area. In Example 9-17, we add a hideMenu
function that hides the <DIV> tag when the menu needs to be closed.
Example 9-17 hideMenu function
function hideMenu()
{
document.getElementById("menu").style.visibility='hidden';
}
How does hideMenu get called? The simplest way is to call it in the onClick
attribute of the page’s ...