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, Tarantella 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.