Secure Global Desktop 4.31 Administration Guide > Applets > suspendApplication (X emulator applet)
void suspendApplication()
The suspendApplication
method suspends or ends the
current emulator session:
<SCRIPT LANGUAGE="JavaScript"> window.onerror = trapError function trapError(message, url, line) { alert("There's no X emulator session to stop"); return true } function stopEmulator() { top.WebtopFrame.DisplayFrame.document.applets["Tarantella X Emulator"].suspendApplication(); alert("X emulator session stopped"); } </SCRIPT> <FORM> <INPUT TYPE=button VALUE="Stop" onclick="stopEmulator()"> </FORM>
This example adds a button beneath the links on users' webtops. When a user clicks this button, Secure Global Desktop stops the current X emulator session, if one is running.
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 suspendApplication
method to access the X
emulator applet used by your new theme.
Copyright © 1997-2007 Sun Microsystems, Inc. All rights reserved.