Secure Global Desktop Administration Guide > Applets > getNumberOfObjects (webtop script and webtop tray applets)
int getNumberOfObjects()
Returns the number of links on the webtop.
This method can be used with either the webtop script applet or the webtop tray applet.
<SCRIPT LANGUAGE="JavaScript"> function showLinkCount() { alert("There are " + document.applets["Tarantella Webtop"].getNumberOfObjects() + " links on the webtop"); } </SCRIPT> <FORM> <INPUT TYPE=button VALUE="How many links?" onclick="showLinkCount()"> </FORM>
This example adds a button beneath the links on users' webtops. When a user clicks this button, Secure Global Desktop displays a message containing the number of links on the webtop.
Add the code to the HTML document containing the webtop tray applet
(left.html
, in the sco/tta/standard
webtop
theme), after the TTAAPPLET
declaration.
Note This example assumes you are using the sco/tta/standard webtop
theme. If you're using another theme, with different frame names and
layouts, or different applet names, you'll need to modify the line
that invokes the getNumberOfObjects
method to access the
webtop tray applet used by your new theme.
Copyright © 1997-2005 Sun Microsystems, Inc. All rights reserved.