]> gitweb.factorcode.org Git - factor.git/blobdiff - extra/webapps/fjsc/www/termlib/faq.html
core: Add the shuffler words but without primitives.
[factor.git] / extra / webapps / fjsc / www / termlib / faq.html
index 5adb516b0759a00993700868ff7f7501407daafb..92245e441241637ab24a61ca733bae633585a241 100644 (file)
-<HTML>\r
-<HEAD>\r
-       <TITLE>mass:werk termlib faq</TITLE>\r
-\r
-<STYLE TYPE="text/css">\r
-body,p,a,td {\r
-       font-family: courier,fixed,swiss,sans-serif;\r
-       font-size: 12px;\r
-       color: #cccccc;\r
-}\r
-.lh13 {\r
-       line-height: 13px;\r
-}\r
-.lh15 {\r
-       line-height: 15px;\r
-}\r
-pre {\r
-       font-family: courier,fixed,swiss,sans-serif;\r
-       color: #ccffaa;\r
-       font-size: 12px;\r
-       line-height: 15px;\r
-}\r
-.prop {\r
-       font-family: courier,fixed,swiss,sans-serif;\r
-       color: #bbee99;\r
-       font-size: 12px;\r
-       line-height: 15px;\r
-}\r
-h1 {\r
-       font-family: courier,fixed,swiss,sans-serif;\r
-       font-size: 16px;\r
-       color: #cccccc;\r
-}\r
-b.quest {\r
-       font-family: courier,fixed,swiss,sans-serif;\r
-       font-size: 14px;\r
-       font-weight: bold;\r
-       color: #bbee99;\r
-}\r
-a,a:link,a:visited {\r
-       text-decoration: none;\r
-       color: #77dd11;\r
-}\r
-a:hover {\r
-       text-decoration: underline;\r
-       color: #77dd11;\r
-}\r
-a:active {\r
-       text-decoration: underline;\r
-       color: #dddddd;\r
-}\r
-\r
-@media print {\r
-       body { background-color: #ffffff; }\r
-       body,p,a,td {\r
-               font-family: courier,fixed,swiss,sans-serif;\r
-               font-size: 12px;\r
-               color: #000000;\r
-       }\r
-       .lh13 {\r
-               line-height: 13px;\r
-       }\r
-       .lh15 {\r
-               line-height: 15px;\r
-       }\r
-       pre,.prop {\r
-               font-family: courier,fixed,swiss,sans-serif;\r
-               font-size: 12px;\r
-               color: #000000;\r
-               line-height: 15px;\r
-       }\r
-       h1 {\r
-               font-family: courier,fixed,swiss,sans-serif;\r
-               font-size: 16px;\r
-               color: #000000;\r
-       }\r
-       b.quest {\r
-               font-family: courier,fixed,swiss,sans-serif;\r
-               font-size: 14px;\r
-               font-weight: bold;\r
-               color: #000000;\r
-       }\r
-       a,a:link,a:visited {\r
-               text-decoration: none;\r
-               color: #000000;\r
-       }\r
-       a:hover {\r
-               text-decoration: underline;\r
-               color: #000000;\r
-       }\r
-       a:active {\r
-               text-decoration: underline;\r
-               color: #000000;\r
-       }\r
-}\r
-</STYLE>\r
-</HEAD>\r
-\r
-\r
-<BODY BGCOLOR="#222222" LINK="#77dd11" TEXT="#cccccc" ALINK="#dddddd" VLINK="#77dd11"\r
-TOPMARGIN="0" BOTTOMMARGIN="0" LEFTMARGIN="0" RIGHTMARGIN="0" MARGINHEIGHT="0" MARGINWIDTH="0"><A NAME="top"></A>\r
-\r
-<TABLE BORDER="0" CELLSPACING="20" CELLPADDING="0" ALIGN="center">\r
-<TR>\r
-       <TD NOWRAP><A HREF="index.html">termlib.js home</A></TD>\r
-       <TD>|</TD>\r
-       <TD NOWRAP><A HREF="multiterm_test.html">multiple terminal test</A></TD>\r
-       <TD>|</TD>\r
-       <TD NOWRAP><A HREF="parser_sample.html">sample parser</A></TD>\r
-       <TD>|</TD>\r
-       <TD NOWRAP>faq</TD>\r
-       <TD>|</TD>\r
-       <TD NOWRAP><A HREF="readme.txt" TITLE="readme.txt (text/plain)">documentation</A></TD>\r
-</TR>\r
-</TABLE>\r
-\r
-<TABLE BORDER="0" CELLSPACING="20" CELLPADDING="0" WIDTH="700" ALIGN="center">\r
-       <TR><TD>\r
-               <H1>frequently asked questions</H1>\r
-       </TD></TR>\r
-       <TR><TD CLASS="lh13">\r
-&nbsp;<BR>\r
-       <UL>\r
-       <LI CLASS="lh15"><A HREF="#chrome">Can I add chrome to the terminal? (e.g. a window header, a close box)</A></LI>\r
-       <LI CLASS="lh15"><A HREF="#embed">How can I embed a terminal relative to my HTML layout?</A></LI>\r
-       <LI CLASS="lh15"><A HREF="#syntax">I pasted your sample code and just got an error. - ???</A></LI>\r
-       <LI CLASS="lh15"><A HREF="#keyboard">I can't get any input, but I don't get any erros too.</A></LI>\r
-       <LI CLASS="lh15"><A HREF="#keylock">How can I temporary disable the keyboard handlers?</A></LI>\r
-       <LI CLASS="lh15"><A HREF="#linesranges">How can I set the cusor to the start / the end of the command line?</A></LI>\r
-       <LI CLASS="lh15"><A HREF="#historyunique">How can I limit the command history to unique entries only?</A></LI>\r
-       <LI CLASS="lh15"><A HREF="#rebuild">How can I change my color theme on the fly?</A></LI>\r
-       <LI CLASS="lh15"><A HREF="#connect">How can I connect to a server?</A></LI>\r
-       </UL>\r
-       </TD></TR>\r
-       <TR><TD CLASS="lh13"><A NAME="chrome"></A>\r
-&nbsp;<BR>\r
-<B CLASS="quest">Can I add chrome to the terminal? (e.g. a window header, a close box)</B><BR><BR>\r
-\r
-Not by the means of the Terminal object's interface (since there are way too many things that you may possibly want to add).<BR>\r
-The Terminal object allows you to specify the background color, the frame color, the frame's width and the font class used. If you want to add more chrome, you must align this in a separate division element.<BR><BR>\r
-\r
-To calculate the dimensions of the terminal use this formula:<BR><BR>\r
-\r
-width:&nbsp; 2 * frameWidth + conf.cols * &lt;width of &nbsp;&gt; + 2 * 2px padding (left and right)<BR>\r
-height: 2 * frameWidth + conf.rows * conf.rowHeight + 2 * 2px padding (top and bottom).<BR><BR>\r
-\r
-Or you could get the empirical values for width and height by calling a terminal's `<SPAN CLASS="prop">getDimensions()</SPAN>' method, once the terminal is open. (see documentation in &quot;readme.txt&quot;).<BR><BR>\r
-\r
-Finnally, you could obviously embed the terminal's division element in your custom chrome layout (see below). [This will not be compatible to Netscape 4.]<BR><BR>\r
-\r
-p.e.:<PRE>\r
-  &lt;div id=&quot;myTerminal1&quot; style=&quot;position:absolute; top:100px; left:100px;&quot;&gt;\r
-     &lt;table class=&quot;termChrome&quot;&gt;\r
-       &lt;tbody&gt;\r
-        &lt;tr&gt;\r
-           &lt;td class=&quot;termTitle&quot;&gt;terminal 1&lt;/td&gt;\r
-        &lt;/tr&gt;\r
-        &lt;tr&gt;\r
-           &lt;td class=&quot;termBody&quot;&gt;&lt;div id=&quot;termDiv1&quot; style=&quot;position:relative&quot;&gt;&lt;/div&gt;&lt;/td&gt;\r
-        &lt;/tr&gt;\r
-       &lt;/tbody&gt;\r
-     &lt;/table&gt;\r
-   &lt;/div&gt;\r
-\r
-   // get a terminal for this\r
-\r
-   var term1 = new Terminal(\r
-                 {\r
-                   x: 0,\r
-                   y: 0,\r
-                   id: 1,\r
-                   termDiv: &quot;termDiv1&quot;,\r
-                   handler: myTermHandler\r
-                 }\r
-              );\r
-   term1.open();\r
-   \r
-   // and this is how to move the chrome and the embedded terminal\r
-\r
-   TermGlobals.setElementXY( &quot;myTerminal1&quot;, 200, 80 );\r
-</PRE>\r
-To keep track of the instance for any widgets use the terminal's `id' property. (You must set this in the configuration object to a unique value for this purpose.)<BR><BR>\r
-\r
-For a demonstration see the <A HREF="chrome_sample.html">Chrome Sample Page</A>.\r
-       </TD></TR>\r
-       <TR><TD CLASS="lh13"><A NAME="embed"></A>\r
-&nbsp;<BR>\r
-<B CLASS="quest">How can I embed a terminal relative to my HTML layout?</B><BR><BR>\r
-\r
-Define your devision element with attribute &quot;position&quot; set to &quot;relative&quot; and place this inside your layout. Call &quot;new Terminal()&quot; with config-values { x: 0, y: 0 } to leave it at its relative origin.\r
-       </TD></TR>\r
-       <TR><TD CLASS="lh13"><A NAME="syntax"></A>\r
-&nbsp;<BR>\r
-<B CLASS="quest">I pasted your sample code and just got an error. - ???</B><BR><BR>\r
-\r
-The short examples are kept arbitrarily simple to show the syntax.<BR>\r
-Make sure that your divison element(s) is/are rendered by the browser before `Terminal.open()' is called.<BR><BR>\r
-\r
-Does not work:\r
-<PRE>  &lt;head&gt;\r
-  &lt;script&gt;\r
-    var term = new Terminal();\r
-    term.open();\r
-  &lt;/script&gt;\r
-  &lt;/head&gt;\r
-</PRE>\r
-Does work:\r
-<PRE>  &lt;head&gt;\r
-  &lt;script&gt;\r
-    var term;\r
-    \r
-    function termOpen() {\r
-       // to be called from outside after compile time\r
-       term = new Terminal();\r
-       term.open();\r
-    }\r
-  &lt;/script&gt;\r
-  &lt;/head&gt;\r
-</PRE>\r
-c.f. &quot;readme.txt&quot;<BR>\r
-(Opening a terminal by clicking a link implies also that the page has currently focus.)<BR><BR>\r
-With v.1.01 and higher this doesn't cause an error any more.<BR>`Terminal.prototype.open()' now returns a value for success.\r
-       </TD></TR>\r
-       <TR><TD CLASS="lh13"><A NAME="keyboard"></A>\r
-&nbsp;<BR>\r
-<B CLASS="quest">I can't get any input, but I don't get any erros too.</B><BR><BR>\r
-\r
-The Terminal object's functionality relies on the browsers ability to generate and handle keyboard events.<BR>\r
-Sadly some browsers lack a full implementation of the event model. (e.g. Konquerer [khtml] and early versions of Apple Safari, which is a descendant of khtml.)\r
-       </TD></TR>\r
-       <TR><TD CLASS="lh13"><A NAME="keylock"></A>\r
-&nbsp;<BR>\r
-<B CLASS="quest">How can I temporary disable the keyboard handlers?</B><BR>\r
-<SPAN CLASS="prop">(The terminal is blocking my HTML form fields, etc.)</SPAN><BR><BR>\r
-\r
-With version 1.03 there's a global property `<SPAN CLASS="prop">TermGlobals.keylock</SPAN>'. Set this to `true' to disable the keyboard handlers without altering any other state. Reset it to `false' to continue with your terminal session(s).\r
-       </TD></TR>\r
-       <TR><TD CLASS="lh13"><A NAME="linesranges"></A>\r
-&nbsp;<BR>\r
-<B CLASS="quest">How can I set the cusor to the start / the end of the command line?</B><BR><BR>\r
-\r
-In case you need to implement a shortcut (like ^A of some UN*X-shells) to jump to the beginning or the end of the current input line, there are two private instance methods you could utilize:<BR><BR>\r
-`<SPAN CLASS="prop">_getLineEnd(&lt;row&gt;, &lt;col&gt;)</SPAN>' returns an array [&lt;row&gt;, &lt;col&gt;] with the position of the last character in the logical input line with ASCII value &gt;= 32 (0x20).<BR><BR>\r
-`<SPAN CLASS="prop">_getLineStart(&lt;row&gt;, &lt;col&gt;)</SPAN>' returns an array [&lt;row&gt;, &lt;col&gt;] with the position of the first character in the logical input line with ASCII value &gt;= 32 (0x20).<BR><BR>\r
-Both take a row and a column of a cursor position as arguments.<BR><BR>\r
-\r
-p.e.:\r
-<PRE>\r
-  // jump to the start of the input line\r
-\r
-  myCtrlHandler() {\r
-     // catch ^A and jump to start of the line\r
-     if (this.inputChar == 1) {\r
-        var firstChar = this._getLineStart(this.r, this.c);\r
-        this.cursorSet(firstChar[0], firstChar[1]);\r
-     }\r
-  }</PRE>\r
-(Keep in mind that this is not exactly a good example, since some browser actually don't issue a keyboard event for \r
-&quot;^A&quot;. And other browsers, which do catch such codes, are not very reliable in that.)\r
-       </TD></TR>\r
-       <TR><TD CLASS="lh13"><A NAME="historyunique"></A>\r
-&nbsp;<BR>\r
-<B CLASS="quest">How can I limit the command history to unique entries only?</B><BR>\r
-       <SPAN CLASS="prop">(My application effords commands to be commonly repeated.)</SPAN><BR><BR>\r
-\r
-With version 1.05 there is a new configuration and control flag `<SPAN CLASS="prop">historyUnique</SPAN>'. All you need is setting this to `true' in your terminal's configuration object.\r
-       </TD></TR>\r
-       <TR><TD CLASS="lh13"><A NAME="rebuild"></A>\r
-&nbsp;<BR>\r
-<B CLASS="quest">How can I change my color theme on the fly?</B><BR><BR>\r
-\r
-With version 1.07 there is a new method `<SPAN CLASS="prop">Terminal.rebuild()</SPAN>'.<BR>\r
-This method updates the GUI to current config settings while preserving all other state.<BR><BR>\r
-p.e.:\r
-<PRE>\r
-   // change color settings on the fly\r
-   // here: set bgColor to white and font style to class &quot;termWhite&quot;\r
-   // method rebuild() updates the GUI without side effects\r
-   // assume var term holds a referene to a Terminal object already active\r
-\r
-   term.conf.bgColor = '#ffffff';\r
-   term.conf.fontClass = 'termWhite';\r
-   term.rebuild();</PRE>\r
-       </TD></TR>\r
-       <TR><TD CLASS="lh13"><A NAME="connect"></A>\r
-&nbsp;<BR>\r
-<B CLASS="quest">How can I connect to a server?</B><BR><BR>\r
-\r
-The Terminal object only provides an interface to handle console input and output.<BR>\r
-External connections have to be handled outside the Terminal object. You could use the XMLHttpRequest-Object (and use a communication model like AJAX or JSON) or connect via a frame or iframe element to a foreign host.<BR><BR>\r
-Handling connections is considered to be out of the realm of the &quot;termlib.js&quot; library.<BR>\r
-The code you need is in fact quite simple:\r
-<PRE>\r
-  function connectToHost(url) {\r
-     if (window.XMLHttpRequest) {\r
-        request = new XMLHttpRequest();\r
-     }\r
-     else if (window.ActiveXObject) {\r
-         request = new ActiveXObject('Microsoft.XMLHTTP');\r
-     }\r
-     if (request) {\r
-         request.onreadystatechange = requestChangeHandler;\r
-         request.open('GET', url);\r
-         request.send('');\r
-     }\r
-     else {\r
-        // XMLHttpRequest not implemented\r
-     }\r
-  }\r
-  \r
-  function requestChangeHandler() {\r
-     if (request.readyState == 4) {\r
-        // readyState 4: complete; now test for server's response status\r
-        if (request.status == 200) {\r
-           // response in request.responseText or request.responseXML if XML-code\r
-           // if it's JS-code we could get this by eval(request.responseText)\r
-           // by this we could import whole functions to be used via the terminal\r
-        }\r
-        else {\r
-           // connection error\r
-           // status code and message in request.status and request.statusText\r
-        }\r
-     }\r
-  }\r
-</PRE>\r
-You should use this only together with a timer (window.setTimeout()) to handle connection timeouts.<BR>\r
-Additionally you would need some syntax to authenticate and tell the server what you want.<BR>\r
-For this purpose you could use the following methods of the XMLHttpRequest object:<BR><BR>\r
-\r
-       <TABLE BORDER="0" CELLSPACING="0" CELLPADDING="3">\r
-       <TR VALIGN="top"><TD NOWRAP CLASS="prop">setRequestHeader(&quot;<I>headerLabel</I>&quot;, &quot;<I>value</I>&quot;)</TD><TD>set a HTTP header to be sent to the server</TD></TR>\r
-       <TR VALIGN="top"><TD NOWRAP CLASS="prop">getResponseHeader(&quot;<I>headerLabel</I>&quot;)</TD><TD>get a HTTP header sent from the server</TD></TR>\r
-       <TR VALIGN="top"><TD NOWRAP CLASS="prop">open(<I>method</I>, &quot;<I>url</I>&quot; [, <I>asyncFlag</I> [,<BR>&nbsp; &quot;<I>userid</I>&quot; [, &quot;<I>password</I>&quot;]]])</TD><TD>assign the destination properties to the request.<BR>be aware that userid and password are not encrypted!</TD></TR>\r
-       <TR VALIGN="top"><TD NOWRAP CLASS="prop">send(<I>content</I>)</TD><TD>transmit a message body (post-string or DOM object)</TD></TR>\r
-       <TR VALIGN="top"><TD NOWRAP CLASS="prop">abort()</TD><TD>use this to stop a pending connection</TD></TR>\r
-       </TABLE>\r
-\r
-       </TD></TR>\r
-       <TR><TD CLASS="lh13">\r
-       &nbsp;<BR>\r
-       Norbert Landsteiner - August 2005<BR>\r
-       <A HREF="http://www.masswerk.at/" TARGET="_blank">http://www.masswerk.at</A>\r
-       </TD></TR>\r
-       <TR><TD CLASS="lh13">\r
-       &nbsp;<BR>\r
-               <A HREF="#top">&gt; top of page</A>\r
-       </TD></TR>\r
-       <TR><TD CLASS="lh13">\r
-       &nbsp;\r
-       </TD></TR>\r
-</TABLE>\r
-\r
-<DIV ID="termDiv" STYLE="position:absolute; top:20px; left:100px;"></DIV>\r
-\r
-</BODY>\r
+<HTML>
+<HEAD>
+       <TITLE>mass:werk termlib faq</TITLE>
+
+<STYLE TYPE="text/css">
+body,p,a,td {
+       font-family: courier,fixed,swiss,sans-serif;
+       font-size: 12px;
+       color: #cccccc;
+}
+.lh13 {
+       line-height: 13px;
+}
+.lh15 {
+       line-height: 15px;
+}
+pre {
+       font-family: courier,fixed,swiss,sans-serif;
+       color: #ccffaa;
+       font-size: 12px;
+       line-height: 15px;
+}
+.prop {
+       font-family: courier,fixed,swiss,sans-serif;
+       color: #bbee99;
+       font-size: 12px;
+       line-height: 15px;
+}
+h1 {
+       font-family: courier,fixed,swiss,sans-serif;
+       font-size: 16px;
+       color: #cccccc;
+}
+b.quest {
+       font-family: courier,fixed,swiss,sans-serif;
+       font-size: 14px;
+       font-weight: bold;
+       color: #bbee99;
+}
+a,a:link,a:visited {
+       text-decoration: none;
+       color: #77dd11;
+}
+a:hover {
+       text-decoration: underline;
+       color: #77dd11;
+}
+a:active {
+       text-decoration: underline;
+       color: #dddddd;
+}
+
+@media print {
+       body { background-color: #ffffff; }
+       body,p,a,td {
+               font-family: courier,fixed,swiss,sans-serif;
+               font-size: 12px;
+               color: #000000;
+       }
+       .lh13 {
+               line-height: 13px;
+       }
+       .lh15 {
+               line-height: 15px;
+       }
+       pre,.prop {
+               font-family: courier,fixed,swiss,sans-serif;
+               font-size: 12px;
+               color: #000000;
+               line-height: 15px;
+       }
+       h1 {
+               font-family: courier,fixed,swiss,sans-serif;
+               font-size: 16px;
+               color: #000000;
+       }
+       b.quest {
+               font-family: courier,fixed,swiss,sans-serif;
+               font-size: 14px;
+               font-weight: bold;
+               color: #000000;
+       }
+       a,a:link,a:visited {
+               text-decoration: none;
+               color: #000000;
+       }
+       a:hover {
+               text-decoration: underline;
+               color: #000000;
+       }
+       a:active {
+               text-decoration: underline;
+               color: #000000;
+       }
+}
+</STYLE>
+</HEAD>
+
+
+<BODY BGCOLOR="#222222" LINK="#77dd11" TEXT="#cccccc" ALINK="#dddddd" VLINK="#77dd11"
+TOPMARGIN="0" BOTTOMMARGIN="0" LEFTMARGIN="0" RIGHTMARGIN="0" MARGINHEIGHT="0" MARGINWIDTH="0"><A NAME="top"></A>
+
+<TABLE BORDER="0" CELLSPACING="20" CELLPADDING="0" ALIGN="center">
+<TR>
+       <TD NOWRAP><A HREF="index.html">termlib.js home</A></TD>
+       <TD>|</TD>
+       <TD NOWRAP><A HREF="multiterm_test.html">multiple terminal test</A></TD>
+       <TD>|</TD>
+       <TD NOWRAP><A HREF="parser_sample.html">sample parser</A></TD>
+       <TD>|</TD>
+       <TD NOWRAP>faq</TD>
+       <TD>|</TD>
+       <TD NOWRAP><A HREF="readme.txt" TITLE="readme.txt (text/plain)">documentation</A></TD>
+</TR>
+</TABLE>
+
+<TABLE BORDER="0" CELLSPACING="20" CELLPADDING="0" WIDTH="700" ALIGN="center">
+       <TR><TD>
+               <H1>frequently asked questions</H1>
+       </TD></TR>
+       <TR><TD CLASS="lh13">
+&nbsp;<BR>
+       <UL>
+       <LI CLASS="lh15"><A HREF="#chrome">Can I add chrome to the terminal? (e.g. a window header, a close box)</A></LI>
+       <LI CLASS="lh15"><A HREF="#embed">How can I embed a terminal relative to my HTML layout?</A></LI>
+       <LI CLASS="lh15"><A HREF="#syntax">I pasted your sample code and just got an error. - ???</A></LI>
+       <LI CLASS="lh15"><A HREF="#keyboard">I can't get any input, but I don't get any erros too.</A></LI>
+       <LI CLASS="lh15"><A HREF="#keylock">How can I temporary disable the keyboard handlers?</A></LI>
+       <LI CLASS="lh15"><A HREF="#linesranges">How can I set the cusor to the start / the end of the command line?</A></LI>
+       <LI CLASS="lh15"><A HREF="#historyunique">How can I limit the command history to unique entries only?</A></LI>
+       <LI CLASS="lh15"><A HREF="#rebuild">How can I change my color theme on the fly?</A></LI>
+       <LI CLASS="lh15"><A HREF="#connect">How can I connect to a server?</A></LI>
+       </UL>
+       </TD></TR>
+       <TR><TD CLASS="lh13"><A NAME="chrome"></A>
+&nbsp;<BR>
+<B CLASS="quest">Can I add chrome to the terminal? (e.g. a window header, a close box)</B><BR><BR>
+
+Not by the means of the Terminal object's interface (since there are way too many things that you may possibly want to add).<BR>
+The Terminal object allows you to specify the background color, the frame color, the frame's width and the font class used. If you want to add more chrome, you must align this in a separate division element.<BR><BR>
+
+To calculate the dimensions of the terminal use this formula:<BR><BR>
+
+width:&nbsp; 2 * frameWidth + conf.cols * &lt;width of &nbsp;&gt; + 2 * 2px padding (left and right)<BR>
+height: 2 * frameWidth + conf.rows * conf.rowHeight + 2 * 2px padding (top and bottom).<BR><BR>
+
+Or you could get the empirical values for width and height by calling a terminal's `<SPAN CLASS="prop">getDimensions()</SPAN>' method, once the terminal is open. (see documentation in &quot;readme.txt&quot;).<BR><BR>
+
+Finnally, you could obviously embed the terminal's division element in your custom chrome layout (see below). [This will not be compatible to Netscape 4.]<BR><BR>
+
+p.e.:<PRE>
+  &lt;div id=&quot;myTerminal1&quot; style=&quot;position:absolute; top:100px; left:100px;&quot;&gt;
+     &lt;table class=&quot;termChrome&quot;&gt;
+       &lt;tbody&gt;
+        &lt;tr&gt;
+           &lt;td class=&quot;termTitle&quot;&gt;terminal 1&lt;/td&gt;
+        &lt;/tr&gt;
+        &lt;tr&gt;
+           &lt;td class=&quot;termBody&quot;&gt;&lt;div id=&quot;termDiv1&quot; style=&quot;position:relative&quot;&gt;&lt;/div&gt;&lt;/td&gt;
+        &lt;/tr&gt;
+       &lt;/tbody&gt;
+     &lt;/table&gt;
+   &lt;/div&gt;
+
+   // get a terminal for this
+
+   var term1 = new Terminal(
+                 {
+                   x: 0,
+                   y: 0,
+                   id: 1,
+                   termDiv: &quot;termDiv1&quot;,
+                   handler: myTermHandler
+                 }
+              );
+   term1.open();
+   
+   // and this is how to move the chrome and the embedded terminal
+
+   TermGlobals.setElementXY( &quot;myTerminal1&quot;, 200, 80 );
+</PRE>
+To keep track of the instance for any widgets use the terminal's `id' property. (You must set this in the configuration object to a unique value for this purpose.)<BR><BR>
+
+For a demonstration see the <A HREF="chrome_sample.html">Chrome Sample Page</A>.
+       </TD></TR>
+       <TR><TD CLASS="lh13"><A NAME="embed"></A>
+&nbsp;<BR>
+<B CLASS="quest">How can I embed a terminal relative to my HTML layout?</B><BR><BR>
+
+Define your devision element with attribute &quot;position&quot; set to &quot;relative&quot; and place this inside your layout. Call &quot;new Terminal()&quot; with config-values { x: 0, y: 0 } to leave it at its relative origin.
+       </TD></TR>
+       <TR><TD CLASS="lh13"><A NAME="syntax"></A>
+&nbsp;<BR>
+<B CLASS="quest">I pasted your sample code and just got an error. - ???</B><BR><BR>
+
+The short examples are kept arbitrarily simple to show the syntax.<BR>
+Make sure that your divison element(s) is/are rendered by the browser before `Terminal.open()' is called.<BR><BR>
+
+Does not work:
+<PRE>  &lt;head&gt;
+  &lt;script&gt;
+    var term = new Terminal();
+    term.open();
+  &lt;/script&gt;
+  &lt;/head&gt;
+</PRE>
+Does work:
+<PRE>  &lt;head&gt;
+  &lt;script&gt;
+    var term;
+    
+    function termOpen() {
+       // to be called from outside after compile time
+       term = new Terminal();
+       term.open();
+    }
+  &lt;/script&gt;
+  &lt;/head&gt;
+</PRE>
+c.f. &quot;readme.txt&quot;<BR>
+(Opening a terminal by clicking a link implies also that the page has currently focus.)<BR><BR>
+With v.1.01 and higher this doesn't cause an error any more.<BR>`Terminal.prototype.open()' now returns a value for success.
+       </TD></TR>
+       <TR><TD CLASS="lh13"><A NAME="keyboard"></A>
+&nbsp;<BR>
+<B CLASS="quest">I can't get any input, but I don't get any erros too.</B><BR><BR>
+
+The Terminal object's functionality relies on the browsers ability to generate and handle keyboard events.<BR>
+Sadly some browsers lack a full implementation of the event model. (e.g. Konquerer [khtml] and early versions of Apple Safari, which is a descendant of khtml.)
+       </TD></TR>
+       <TR><TD CLASS="lh13"><A NAME="keylock"></A>
+&nbsp;<BR>
+<B CLASS="quest">How can I temporary disable the keyboard handlers?</B><BR>
+<SPAN CLASS="prop">(The terminal is blocking my HTML form fields, etc.)</SPAN><BR><BR>
+
+With version 1.03 there's a global property `<SPAN CLASS="prop">TermGlobals.keylock</SPAN>'. Set this to `true' to disable the keyboard handlers without altering any other state. Reset it to `false' to continue with your terminal session(s).
+       </TD></TR>
+       <TR><TD CLASS="lh13"><A NAME="linesranges"></A>
+&nbsp;<BR>
+<B CLASS="quest">How can I set the cusor to the start / the end of the command line?</B><BR><BR>
+
+In case you need to implement a shortcut (like ^A of some UN*X-shells) to jump to the beginning or the end of the current input line, there are two private instance methods you could utilize:<BR><BR>
+`<SPAN CLASS="prop">_getLineEnd(&lt;row&gt;, &lt;col&gt;)</SPAN>' returns an array [&lt;row&gt;, &lt;col&gt;] with the position of the last character in the logical input line with ASCII value &gt;= 32 (0x20).<BR><BR>
+`<SPAN CLASS="prop">_getLineStart(&lt;row&gt;, &lt;col&gt;)</SPAN>' returns an array [&lt;row&gt;, &lt;col&gt;] with the position of the first character in the logical input line with ASCII value &gt;= 32 (0x20).<BR><BR>
+Both take a row and a column of a cursor position as arguments.<BR><BR>
+
+p.e.:
+<PRE>
+  // jump to the start of the input line
+
+  myCtrlHandler() {
+     // catch ^A and jump to start of the line
+     if (this.inputChar == 1) {
+        var firstChar = this._getLineStart(this.r, this.c);
+        this.cursorSet(firstChar[0], firstChar[1]);
+     }
+  }</PRE>
+(Keep in mind that this is not exactly a good example, since some browser actually don't issue a keyboard event for 
+&quot;^A&quot;. And other browsers, which do catch such codes, are not very reliable in that.)
+       </TD></TR>
+       <TR><TD CLASS="lh13"><A NAME="historyunique"></A>
+&nbsp;<BR>
+<B CLASS="quest">How can I limit the command history to unique entries only?</B><BR>
+       <SPAN CLASS="prop">(My application effords commands to be commonly repeated.)</SPAN><BR><BR>
+
+With version 1.05 there is a new configuration and control flag `<SPAN CLASS="prop">historyUnique</SPAN>'. All you need is setting this to `true' in your terminal's configuration object.
+       </TD></TR>
+       <TR><TD CLASS="lh13"><A NAME="rebuild"></A>
+&nbsp;<BR>
+<B CLASS="quest">How can I change my color theme on the fly?</B><BR><BR>
+
+With version 1.07 there is a new method `<SPAN CLASS="prop">Terminal.rebuild()</SPAN>'.<BR>
+This method updates the GUI to current config settings while preserving all other state.<BR><BR>
+p.e.:
+<PRE>
+   // change color settings on the fly
+   // here: set bgColor to white and font style to class &quot;termWhite&quot;
+   // method rebuild() updates the GUI without side effects
+   // assume var term holds a referene to a Terminal object already active
+
+   term.conf.bgColor = '#ffffff';
+   term.conf.fontClass = 'termWhite';
+   term.rebuild();</PRE>
+       </TD></TR>
+       <TR><TD CLASS="lh13"><A NAME="connect"></A>
+&nbsp;<BR>
+<B CLASS="quest">How can I connect to a server?</B><BR><BR>
+
+The Terminal object only provides an interface to handle console input and output.<BR>
+External connections have to be handled outside the Terminal object. You could use the XMLHttpRequest-Object (and use a communication model like AJAX or JSON) or connect via a frame or iframe element to a foreign host.<BR><BR>
+Handling connections is considered to be out of the realm of the &quot;termlib.js&quot; library.<BR>
+The code you need is in fact quite simple:
+<PRE>
+  function connectToHost(url) {
+     if (window.XMLHttpRequest) {
+        request = new XMLHttpRequest();
+     }
+     else if (window.ActiveXObject) {
+         request = new ActiveXObject('Microsoft.XMLHTTP');
+     }
+     if (request) {
+         request.onreadystatechange = requestChangeHandler;
+         request.open('GET', url);
+         request.send('');
+     }
+     else {
+        // XMLHttpRequest not implemented
+     }
+  }
+  
+  function requestChangeHandler() {
+     if (request.readyState == 4) {
+        // readyState 4: complete; now test for server's response status
+        if (request.status == 200) {
+           // response in request.responseText or request.responseXML if XML-code
+           // if it's JS-code we could get this by eval(request.responseText)
+           // by this we could import whole functions to be used via the terminal
+        }
+        else {
+           // connection error
+           // status code and message in request.status and request.statusText
+        }
+     }
+  }
+</PRE>
+You should use this only together with a timer (window.setTimeout()) to handle connection timeouts.<BR>
+Additionally you would need some syntax to authenticate and tell the server what you want.<BR>
+For this purpose you could use the following methods of the XMLHttpRequest object:<BR><BR>
+
+       <TABLE BORDER="0" CELLSPACING="0" CELLPADDING="3">
+       <TR VALIGN="top"><TD NOWRAP CLASS="prop">setRequestHeader(&quot;<I>headerLabel</I>&quot;, &quot;<I>value</I>&quot;)</TD><TD>set a HTTP header to be sent to the server</TD></TR>
+       <TR VALIGN="top"><TD NOWRAP CLASS="prop">getResponseHeader(&quot;<I>headerLabel</I>&quot;)</TD><TD>get a HTTP header sent from the server</TD></TR>
+       <TR VALIGN="top"><TD NOWRAP CLASS="prop">open(<I>method</I>, &quot;<I>url</I>&quot; [, <I>asyncFlag</I> [,<BR>&nbsp; &quot;<I>userid</I>&quot; [, &quot;<I>password</I>&quot;]]])</TD><TD>assign the destination properties to the request.<BR>be aware that userid and password are not encrypted!</TD></TR>
+       <TR VALIGN="top"><TD NOWRAP CLASS="prop">send(<I>content</I>)</TD><TD>transmit a message body (post-string or DOM object)</TD></TR>
+       <TR VALIGN="top"><TD NOWRAP CLASS="prop">abort()</TD><TD>use this to stop a pending connection</TD></TR>
+       </TABLE>
+
+       </TD></TR>
+       <TR><TD CLASS="lh13">
+       &nbsp;<BR>
+       Norbert Landsteiner - August 2005<BR>
+       <A HREF="http://www.masswerk.at/" TARGET="_blank">http://www.masswerk.at</A>
+       </TD></TR>
+       <TR><TD CLASS="lh13">
+       &nbsp;<BR>
+               <A HREF="#top">&gt; top of page</A>
+       </TD></TR>
+       <TR><TD CLASS="lh13">
+       &nbsp;
+       </TD></TR>
+</TABLE>
+
+<DIV ID="termDiv" STYLE="position:absolute; top:20px; left:100px;"></DIV>
+
+</BODY>
 </HTML>
\ No newline at end of file