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 styles for online and offline links are defined in the cascading style sheetsfile stlinks.css. You can modify the online style in this file, and this will change thestyles on every <strong>Web</strong> page that links to this style sheet. Alternatively, you canoverride the style in your page by adding the style definition in Example 9-7.Example 9-7 Online and offline stylesa.online:link {color:blue; font-weight:normal}a.online:visited {color:blue; font-weight:normal}a.online:hover {color:blue; font-weight:normal}a.offline {color:blue; font-weight:normal}Put the style definition in Example 9-7 after the tag that links tostlinks.css so that it overrides the online style definition in that file.Handling the click eventWe use the event STLinkClicked to override the default click behavior. To handleone of the event types of the Sametime Links Toolkit, you add a function with thename of the event to your page. The function should have the parametersspecified by the event type. To handle the click event, we add an implementationof STLinkClicked (Example 9-8 on page 264). This function is called whenever aSametime link is clicked. Note that unlike all other events in the Toolkit,STLinkClicked overrides the default behavior. Instead of starting an instantmessage, which is the default behavior, our function is called. For all otherevents, custom event handlers are called after the default handler is called.Table 9-2 STLinkClicked event parametersParameteruserNamedisplayNamestatusevtDescriptionThe unique user name as provided in thewriteSametimeLink callThe display name of the userA numeric constant indicating the currentstatus of the user (See the list of statusvalues in the Developer's Guide.)The JavaScript Event object that providesinformation on the click event, such as themouse positionWe use a global variable called selectedName that stores the name of the userwho was clicked. This variable is used by the function that draws the menu andthe functions that implement the menu items actions.Chapter 9. Sametime Links 263

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

Saved successfully!

Ooh no, something went wrong!