suspendApplication (terminal emulator applet)

Syntax

void suspendApplication()

Description

The suspendApplication method suspends or ends the current emulator session:

Examples

<SCRIPT LANGUAGE="JavaScript">

window.onerror = trapError

function trapError(message, url, line) {
   alert("There's no terminal emulator session to stop");
   return true
}

function stopEmulator() {
   top.WebtopFrame.DisplayFrame.document.applets["Tarantella Terminal Emulator"].suspendApplication();
   alert("Terminal 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 terminal 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 terminal emulator applet used by your new theme.

Related topics
  • Terminal emulator applet