zygimantus
10/28/2015 - 8:53 AM

Useful AJAX code

Useful AJAX code

// error handling with ajax (good to use in page templates)
$.ajaxSetup({
    error: function(xhr){
        alert('Request Status: ' + xhr.status + ' Status Text: ' + xhr.statusText + ' ' + xhr.responseText);
    }
});