jquery ajax error callback Edit

Murugan Andezuthu Dharmaratnam | 11 September 2020 | 650

Please check the code below for ajax success and failure.



        
$.ajax({
    url: '/Controller/ActionMethod/?parameter='   paramvalue,
    type: 'PUT',
    success: function (result) {
        // code when ajax request is successfull
    },
    error: function (jqXHR, textStatus, errorThrown) {
        // code when ajax request has failed
        console.debug(xhr); console.debug(error);
    }
});