Better handle ajax call (success, parseerror, fail)