3 <TITLE>termlib Multiple Terminal Test</TITLE>
4 <SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript" SRC="termlib.js"></SCRIPT>
6 <SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
10 multiple terminal test for termlib.js
12 (c) Norbert Landsteiner 2003-2005
13 mass:werk - media environments
14 <http://www.masswerk.at>
21 '%CS%+r Terminal Help %-r%n',
22 ' This is just a tiny test for multiple terminals.',
23 ' use one of the following commands:',
24 ' clear .... clear the terminal',
25 ' exit ..... close the terminal (or <ESC>)',
26 ' id ....... show terminal\'s id',
27 ' switch ... switch to other terminal',
28 ' help ..... show this help page',
29 ' other input will be echoed to the terminal.',
33 function termOpen(n) {
35 var y=(n==1)? 70: 280;
41 greeting: '%+r +++ Terminal #'+n+' ready. +++ %-r%nType "help" for help.%n',
46 exitHandler: termExitHandler
49 if (term[n]) term[n].open();
51 else if (term[n].closed) {
59 function termHandler() {
60 // called on <CR> or <ENTER>
62 var cmd=this.lineBuffer;
65 var other=(this.id==1)? 2:1;
68 else if (cmd=='clear') {
71 else if (cmd=='exit') {
74 else if (cmd=='help') {
78 this.write('terminal id: '+this.id);
81 this.type('You typed: '+cmd);
88 function termExitHandler() {
89 // optional handler called on exit
90 // activate other terminal if open
91 var other=(this.id==1)? 2:1;
92 if ((term[other]) && (term[other].closed==false)) term[other].focus();
98 <STYLE TYPE="text/css">
100 font-family: courier,fixed,swiss,sans-serif;
108 font-family: courier,fixed,swiss,sans-serif;
118 text-decoration: none;
122 text-decoration: underline;
126 text-decoration: underline;
130 a.termopen,a.termopen:link,a.termopen:visited {
131 text-decoration: none;
136 text-decoration: none;
141 text-decoration: none;
150 <BODY BGCOLOR="#222222" LINK="#77dd11" TEXT="#cccccc" ALINK="#dddddd" VLINK="#77dd11"
151 TOPMARGIN="0" BOTTOMMARGIN="0" LEFTMARGIN="0" RIGHTMARGIN="0" MARGINHEIGHT="0" MARGINWIDTH="0">
153 <TABLE BORDER="0" CELLSPACING="20" CELLPADDING="0" ALIGN="center">
155 <TD NOWRAP><A HREF="index.html">termlib.js home</A></TD>
157 <TD NOWRAP>multiple terminal test</TD>
159 <TD NOWRAP><A HREF="parser_sample.html">sample parser</A></TD>
161 <TD NOWRAP><A HREF="faq.html">faq</A></TD>
163 <TD NOWRAP><A HREF="readme.txt" TITLE="readme.txt (text/plain)">documentation</A></TD>
167 <TABLE BORDER="0" CELLSPACING="20" CELLPADDING="0">
169 Multiple Terminal Test<BR>
172 <A HREF="javascript:termOpen(1)" onfocus="if(this.blur)this.blur();" onmouseover="window.status='terminal 1'; return true" onmouseout="window.status=''; return true" CLASS="termopen">> open terminal 1 </A>
175 <A HREF="javascript:termOpen(2)" onfocus="if(this.blur)this.blur();" onmouseover="window.status='terminal 2'; return true" onmouseout="window.status=''; return true" CLASS="termopen">> open terminal 2 </A>
177 <TR><TD NOWRAP CLASS="lh15">
179 (c) mass:werk,<BR>N. Landsteiner 2003-2005<BR>
180 <A HREF="http://www.masswerk.at/" TARGET="_blank">http://www.masswerk.at</A>
184 <DIV ID="termDiv1" STYLE="position:absolute; top:20px; left:100px;"></DIV>
185 <DIV ID="termDiv2" STYLE="position:absolute; top:20px; left:100px;"></DIV>