Skip past navigation linksSecure Global Desktop Administration Guide > Applets > getNumberOfObjects (webtop script and webtop tray applets)

getNumberOfObjects (webtop script and webtop tray applets)

Syntax

Skip past command syntax or program codeint getNumberOfObjects()

Description

Returns the number of links on the webtop.

This method can be used with either the webtop script applet or the webtop tray applet.

Examples

Skip past command syntax or program code<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.

Related topics