jQuery Handler error is not a function

前端 未结 2 1486
执笔经年
执笔经年 2021-01-12 10:59

I am using jquery ajax fileupload. the file is uploaded correctkly but i got error like

TypeError: jQuery.handleError is not a function
[Break On This Error         


        
2条回答
  •  一个人的身影
    2021-01-12 11:12

    The jQuery.handleError was removed after the jQuery version in 1.5 you need to write a custom error handler function to solve this like

    jQuery.extend({
        handleError: function( s, xhr, status, e ) {
            // If a local callback was specified, fire it
            if ( s.error )
                s.error( xhr, status, e );
            // If we have some XML response text (e.g. from an AJAX call) then log it in the console
            else if(xhr.responseText)
                console.log(xhr.responseText);
        }
    });
    

    Refer from the blog. Thanks John Main for your information

提交回复
热议问题