Tell me how to make sure that when ajax sends a request to the handler, the answer will be output to a specific block with an error under the jquery 1.8.0 form? Tell me how it can be implemented. If possible, throw a tutorial. Thank you in advance!

    1 answer 1

    If you send an Ajax request via jQuery, then in the sent data array specify the function that will be triggered whenever an AJAX request fails:

    $.ajax({ // ... error: function (e, err_msg) { alert(err_msg); }, // ... }) 

    This method is the "reverse" method of success - success