Why is jqXHR.responseText returning a string instead of a JSON object?

I had the same problem. I returns a string because it formulated from an exception. E.g. I use a kernel listener with serialization to json on my Symfony2 project. Which is correct for proper REST headers. Anyway, just parse it; this works for me: $.ajaxSetup({ “error”: function(jqXHR, status, thrownError) { alert(‘error’); var responseText = jQuery.parseJSON(jqXHR.responseText); … Read more

jQuery.post( ) .done( ) and success:

jQuery used to ONLY have the callback functions for success and error and complete. Then, they decided to support promises with the jqXHR object and that’s when they added .done(), .fail(), .always(), etc… in the spirit of the promise API. These new methods serve much the same purpose as the callbacks but in a different … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)