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

« back to all changes in this revision

Viewing changes to ivle/webapp/filesystem/browser/media/browser.js

  • Committer: William Grant
  • Date: 2009-12-07 05:01:09 UTC
  • mfrom: (1340 trunk)
  • mto: This revision was merged to the branch mainline in revision 1353.
  • Revision ID: grantw@unimelb.edu.au-20091207050109-230vmxx0lmfiphjx
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
380
380
    if (upload_callback_count >= 2)
381
381
    {
382
382
        myFrame = frames['upload_iframe'].document;
383
 
        data = myFrame.firstChild.childNodes[1].firstChild.firstChild.nodeValue;
 
383
        /* Browsers will turn the raw returned JSON into an HTML document. We
 
384
         * need to get the <pre> from inside the <body>, and look at its text.
 
385
         */
 
386
        data = myFrame.firstChild.getElementsByTagName(
 
387
            'body')[0].firstChild.firstChild.nodeValue;
384
388
        data = JSON.parse(data);
385
389
        if ('Error' in data)
386
390
            alert("Error: " + decodeURIComponent(data['Error']));