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

« back to all changes in this revision

Viewing changes to www/media/tutorial/tutorial.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:
37
37
    var code = problembox.value;
38
38
 
39
39
    /* Dump the entire file to the console */
40
 
    /* FIXME: Multiple lines aren't received properly by the server */
41
 
    console_enter_line(code);
 
40
    console_enter_line(code, "block");
42
41
    return;
43
 
 
44
 
    /* TEMP: Old code here */
45
 
    var args = {"code": code, "problem": filename, "action": "run"};
46
 
 
47
 
    /* Send the form as multipart/form-data, since we are sending a whole lump
48
 
     * of Python code, it should be treated like a file upload. */
49
 
    var xhr = ajax_call("tutorialservice", "", args, "POST",
50
 
        "multipart/form-data");
51
 
    var testresponse = JSON.parse(xhr.responseText);
52
 
    handle_runresponse(problemdiv, testresponse);
53
42
}
54
43
 
55
44
/** Given a response object (JSON-parsed object), displays the result of the