阿贾克斯上传插件扔jQuery.handleError未找到 [英] Ajax upload plugin throwing jQuery.handleError not found

查看:162
本文介绍了阿贾克斯上传插件扔jQuery.handleError未找到的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用从 PHP信中的AJAX文件上传插件和我使用jQuery 1.6.2.The文件正确上传,但我无法从用户的PHP脚本,当我检查的JavaScript错误consolse是我迎接这个错误返回的JSON数据,

Am using the ajax file upload plugin from PHP Letter and am using jQuery 1.6.2.The files upload properly, but am unable to user the JSON data returned from the php script, when i check the javascript error consolse am i greeted with this error,

未捕获的类型错误:对象功能(A,B){返回新   e.fn.init(A,B,H)}没有方法'handleError的'

"Uncaught TypeError: Object function (a,b){return new e.fn.init(a,b,h)} has no method 'handleError'"

在Chrome和

jQuery.handleError不是一个函数

"jQuery.handleError is not a function"

在Firefox。

没有任何一个有过类似的经历?

Does any one have a similar experience?

推荐答案

当你试图使用这种与jQuery的最新版本,它是。 handleError的功能是从库上则V 1.5 pciated德$ P $。 我只需添加这个功能在我ajaxfileupload.js文件来解决它。

It was when you are trying to use this with latest version of jQuery. handleError function is depreciated from library upper then V 1.5. I resolve it by just adding this function in my ajaxfileupload.js file.

handleError: function( s, xhr, status, e ) {
    // If a local callback was specified, fire it
    if ( s.error ) {
        s.error.call( s.context || window, xhr, status, e );
    }

    // Fire the global callback
    if ( s.global ) {
        (s.context ? jQuery(s.context) : jQuery.event).trigger( "ajaxError", [xhr, s, e] );
    }
}

和它为我工作正常。 另外,如果你试图同一页上使用任何ajaxSubmit会(),它会不会工作,所以我用正常的形式提交与ajxfileupload。如果任何一个可以同样的方式帮助,请让我知道。

and it works fine for me. Also, if you try to use any ajaxSubmit() on same page it will wont work, so i use normal form submit with ajxfileupload. if any one can help in same way please let me know.

这篇关于阿贾克斯上传插件扔jQuery.handleError未找到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆