Secure Global Desktop 4.31 Administration Guide > Applets > isLoggedIn (framework applet)
int isLoggedIn()
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. |
<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).
Copyright © 1997-2007 Sun Microsystems, Inc. All rights reserved.