Secure Global Desktop Administration Guide > Applets > isLoggedIn (framework applet)

isLoggedIn (framework applet)

Syntax

int isLoggedIn()

Description

Use the isLoggedIn method to test whether a user is logged in.

This return value... Indicates...
0 The user is logged in.
>0 The user is not logged in.

Examples

<SCRIPT Language="JavaScript">
function Wait()
{
   setTimeout("DoLogin()", 4000);
}
function DoLogin()
{
   var applet = top.StateFrame.document.applets["Tarantella Framework"];
   status = 0;
   if (!applet.isLoggedIn())
      status=applet.login("", "");
   if (status == 0)
   {
      frameset = applet.getWebtopURL();
      applet.showDocument(frameset, "MainFrame");
   }
}

</SCRIPT>

Defines a function that tests whether a user is logged in before returning the URL of the webtop frame. It assumes that the Framework applet is in a frame called "StateFrame" (this is its normal location).

Related topics