Skip past navigation linksSecure Global Desktop Administration Guide > Applets > isLoggedIn (framework applet)

isLoggedIn (framework applet)

Syntax

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

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