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

getObjectDisplayName (webtop script and webtop tray applets)

Syntax

Skip past command syntax or program codeString getObjectDisplayName(int objectNumber)

Description

Returns the name Secure Global Desktop displays as part of the link if the webtop tray applet's ShowIcon parameter has the value true.

objectNumber specifies a link on the webtop. The value 0 specifies the first link on the webtop, 1 the second and so on. The method returns an error if objectNumber is greater than the number of links on the webtop.

Note You can use the applet's ObjectNumber parameter to change the number from which links are numbered (default is zero).

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 showLinkLabels() {
   output = "The webtop tray contains these links:\n";
   count_links = document.applets["Tarantella Webtop"].getNumberOfObjects();
 
   for (var link = 0 ; link < count_links ; link++) {
      obj_name = document.applets["Tarantella Webtop"].getObjectDisplayName(link);
      output = output + "\t" + obj_name + "\n";
   }
 
   alert(output);
}
 
</SCRIPT>
 
<FORM>
   <INPUT TYPE=button VALUE="Which links?" onclick="showLinkLabels()">
</FORM>

This example adds a button beneath the links on users' webtops. When a user clicks this button, Secure Global Desktop displays the names of all objects which have a link 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 lines that invoke the getObjectDisplayName and getNumberOfObjects methods to access the webtop tray applet used by your new theme.

Related topics