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

« back to all changes in this revision

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

  • Committer: mattgiuca
  • Date: 2008-01-11 06:01:41 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:182
browser.js: Now correctly implements do_action and navigate. Able to perform
actions properly. Handling the result is not yet implemented.

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
{
44
44
    args.action = action;
45
45
    /* Call the server and perform the action. This mutates the server. */
46
 
    response = call_ajax("fileservice", path, args, "POST", content_type);
 
46
    response = ajax_call("fileservice", path, args, "POST", content_type);
47
47
    /* Check for action errors reported by the server, and report them to the
48
48
     * user */
49
 
    /* TODO */
 
49
    error = response.getResponseHeader("X-IVLE-Action-Error");
 
50
    if (error != null)
 
51
        alert("Error: " + error.toString() + ".");
50
52
    /* Now read the response and set up the page accordingly */
51
53
    handle_response(path, response);
52
54
}
62
64
function navigate(path)
63
65
{
64
66
    /* Call the server and request the listing. This mutates the server. */
65
 
    response = call_ajax("fileservice", path, null, "GET");
 
67
    response = ajax_call("fileservice", path, null, "GET");
66
68
    /* Now read the response and set up the page accordingly */
67
69
    handle_response(path, response);
68
70
}