bootstrap-ajax-typeahead icon indicating copy to clipboard operation
bootstrap-ajax-typeahead copied to clipboard

Overriding error handling

Open mexanoid opened this issue 10 years ago • 0 comments

When ajax object is built need to add error function overriding for ajax call failure. (Example: 503 Service unavailable)

this.ajax.xhr = $.ajax({
                    url: this.ajax.url,
                    data: params,
                    success: $.proxy(this.ajaxSource, this),          
                    //for example like that
                    error: this.ajax.error,         
                    type: this.ajax.method || 'get',
                    dataType: 'json'
                });

mexanoid avatar Sep 09 '15 10:09 mexanoid