~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to www/media/console/console.js

  • Committer: drtomc
  • Date: 2008-02-01 03:02:14 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:365
Make the console accept blocks of code.

Show diffs side-by-side

added added

removed removed

Lines of Context:
208
208
 * to its response by writing to the output box.
209
209
 * Also maximize the console window if not already.
210
210
 */
211
 
function console_enter_line(inputline)
 
211
function console_enter_line(inputline, which)
212
212
{
213
213
    /* Start the server if it hasn't already been started */
214
214
    start_server();
215
215
    var digest = hex_md5(inputline + server_magic);
216
216
    var args = {"host": server_host, "port": server_port,
217
217
                    "digest":digest, "text":inputline};
218
 
    var xmlhttp = ajax_call("consoleservice", "chat", args, "POST");
 
218
    var xmlhttp = ajax_call("consoleservice", which, args, "POST");
219
219
 
220
220
    var res = JSON.parse(xmlhttp.responseText);
221
221
    var output = document.getElementById("console_output");
314
314
        break;
315
315
    case 13:                /* Enter key */
316
316
        /* Send the line of text to the server */
317
 
        console_enter_line(inp.value);
 
317
        console_enter_line(inp.value, "chat");
318
318
        hist.submit(inp.value);
319
319
        inp.value = hist.curr();
320
320
        break;