since you are returning an XMLHttpRequest object, you can always look
active_project_categories_ajax.readyState
active_project_categories_ajax.status
for ReadyState there must be 4 to complete (success or error). therefore, if it is less than 4, it is still active.
this is readyState:
const unsigned short UNSENT = 0;
const unsigned short OPENED = 1;
const unsigned short HEADERS_RECEIVED = 2;
const unsigned short LOADING = 3;
const unsigned short DONE = 4;
quote from: http://www.w3.org/TR/XMLHttpRequest/#the-xmlhttprequest-interface
, ReadyState 4. . ( , php, 1MB ... readyState 3, 200. , 200, ReadyState 2).