Skip past navigation linksSecure Global Desktop 4.31 Administration Guide > Applets > login method

login method

Syntax

Skip past command syntax or program codeint login(String user, String password)

Description

The login method allows users to log in to Secure Global Desktop without having to use the login applet. It can be used with the following Secure Global Desktop applets:

This method requires the username and password of the user to log in.

The login method returns 0 if the user is successfully logged in; otherwise it returns the relevant error code.

Note For all applets, except the Framework applet, we recommend that you only use this method if you have exhausted all other means for logging a user in and that you also use the scriptStart method.

Examples

Skip past command syntax or program code<SCRIPT Language="JavaScript">
function login(username, password)
{
   status = document.applets[0].login(username, password);

   if (status != 0)
      alert ( "Failed to log in: error " + status );
}
</SCRIPT>

Defines a function that logs a user in, or displays a dialog containing the error code.

Note that the applet must be present in the same web page as the login method.

Related topics