Jquery Error

If you check the jQuery manual page for the $.ajax function, it says that the error callback takes three arguments: The jqXHR (request) object, a string describing the type of error, and a string with actual error message that was returned.

Try changing your functions to output the 2nd and 3rd arguments to the console to get more useful information about the error.