Changeset 4278


Ignore:
Timestamp:
01/16/14 18:11:30 (10 years ago)
Author:
sroth
Message:

Added ajax error handler for POST and aid value extraction.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • DASISH/t5.6/client/trunk/chrome/markingcollection/content/markingcollection/annotator-service/annotation-service.js

    r4272 r4278  
    5656                data: annotation,
    5757                contentType: "application/xml",
     58                error: function(jqXHR, status, thrownError) {
     59                    // Handle any errors
     60                    if (typeof Firebug !== 'undefined' && Firebug.Console) {
     61                        Firebug.Console.log("+ + + + + + + + + + + + + + + + + + + + + + + +");
     62                        Firebug.Console.log("Status Code: " + jqXHR.status);
     63                        Firebug.Console.log("Error : " + thrownError);
     64                    }
     65                },
    5866                complete: function(jqXHR, status, responseText) {
     67                    var response = jqXHR.responseText.match(/URI="(.+?)"/)[1].split('/');
     68                    var aid = response[response.length - 1];
     69
    5970                    if (typeof Firebug !== 'undefined' && Firebug.Console) {
    6071                        Firebug.Console.log("+ + + + + + + + + + + + + + + + + + + + + + + +");
    6172                        Firebug.Console.log("Status Code: " + jqXHR.status);
    6273                        Firebug.Console.log("Response Body: " + jqXHR.responseText);
     74                        Firebug.Console.log("+ + + + + + + + + + + + + + + + + + + + + + + +");
     75                        Firebug.Console.log("AID: " + aid);
    6376                    }
    6477                }
Note: See TracChangeset for help on using the changeset viewer.