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

getObjectImageName (webtop script and webtop tray applets)

Syntax

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

Description

Returns the name of the image associated with the specified link. This is the icon Secure Global Desktop displays as part of the link if the webtop tray applet's ShowIcon parameter has the value true.

This image is specified by the associated object's Webtop Icon attribute. The information returned depends on the attribute's value:

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

This example adds a button beneath the links on users' webtops. When a user clicks this button, Secure Global Desktop displays the image names associated with each 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 getNumberOfObjects and getObjectImageName methods to access the webtop tray applet used by your new theme.

Related topics