最近使用ajaxfileupload插件上传文件时,后台正常运行时,可以正常使用;当后台出现异常时,上传后没有任何反应,也无任何返回信息,使用chrome查看时,发现ajaxfileupload插件报错,信息如下:"Uncaught TypeError: Object function (a,b){return new e.fn.init(a,b,h)} has no method 'handleError'"。

经过在网上搜索答案,发现是由于JQuery在1.5版本后就废除了handleError方法,因此需要在ajaxfileupload中自己添加handleError方法,方法如下:

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] );
}
}

使用ajaxfileupload插件提示Uncaught TypeError:has no method 'handleError'的更多相关文章

  1. “Uncaught TypeError: Cannot call method 'createChild' of undefined" 问题的解决

    Uncaught TypeError: Cannot call method 'createChild' of undefined 我在使用Ext 4.1.1做grid.Panel,然后chrome爆 ...

  2. JsBridge "Uncaught TypeError: Cannot call method 'callHandler' of undefined", source

    h5和原生结合开发app越来越流行.其实就是webview 的js调用native的方法.也就是需要搭建一个桥.这样的桥早就有人搭建好了,那就是jsbridge. git地址: https://git ...

  3. Android WebView Error – Uncaught TypeError: Cannot call method ‘getItem’ of null at

    本质原因是js 没有判断dom 是否加载完毕 其实就是在dom 加载完毕之后处理事件 wv.getSettings().setDomStorageEnabled(true); 转自 蛙齋  http: ...

  4. form 表单<input type="button" value="登录" onclick="loginSubmit ()"/> 点击提示 Uncaught TypeError: loginSubmit is not a function

    在网上搜了一堆东东,仔细看了一下,再加上实验,发现原因出在<form>中. <form method="post"> <button type=&qu ...

  5. ExtJs 4.2.1 报错:Uncaught TypeError: Cannot call method 'getItems' of null

    做项目的时候遇到这个问题,搞了一上午终于解决了,让我们看看是什么问题: buttons: [ { text: '保存', icon: '../../../Images/extjs/disk.png', ...

  6. bootstrap datepicker Uncaught TypeError: Cannot call method 'split' of undefined问题

    这个问题主要是由于date对象不是字符串,不能使用 split 函数,简单处理一下,转换成字符串就可以解决问题: ++++++++++++++++++++++++ parseDate: functio ...

  7. 360浏览器Uncaught TypeError: object is not a function问题

    刚刚360浏览器提示 Uncaught TypeError: object is not a function,找了半天发现问题是我有一个按钮,id和方法重复了,所以提示这个. <input t ...

  8. [Android] Web Console: Uncaught TypeError: Object [object Object] has no method 'xxx'

    我们开发的产品,有一部分功能,需要在WebView中打开web页面,然后在web页面中通过js方法回调部分native的功能. 对于web回调native的开发方式,如果不了解的话,可以参考我以前的一 ...

  9. Uncaught TypeError: undefined is not a function

    index.html <script src="resources/sap-ui-core.js" id="sap-ui-bootstrap" data- ...

随机推荐

  1. 7 linux服务器程序规范

    1. Linux服务器程序一般以后台进程形式运行.后台进程又称守护进程(daemon),它没有控制终端,因而不会意外接收到用户输入.父进程通常为init(PID为1的进程)2. Linux服务器程序常 ...

  2. Environment.SpecialFolder.CommonApplicationData

    private void button1_Click(object sender, EventArgs e) { var path=Environment.GetFolderPath(Environm ...

  3. 禁止触屏滑动touchmove方法介绍

    在移动端页面开发中,有时需要禁止用户滑动屏幕,搜索了好久才找到移动终端的touch事件,touchstar,touchmove,touchend. 阻止滚动 一些移动设备有缺省的touchmove行为 ...

  4. Apache CXF实现Web Service(2)——不借助重量级Web容器和Spring实现一个纯的JAX-RS(RESTful) web service

    实现目标 http://localhost:9000/rs/roomservice 为入口, http://localhost:9000/rs/roomservice/room为房间列表, http: ...

  5. 制作Ubuntu Live USB的方法

    首先准备一个U盘 然后下载unetbootin 项目主页http://unetbootin.net/ 下载最新版本的unetbootin 打开后界面如下: 如果你已经下载好了ubuntu-12.04- ...

  6. 2014多校第七场1003 || HDU 4937 Lucky Number

    题目链接 题意 : 给定一个十进制n,让你转化成某个进制的数,让这个数只包含3 4 5 6这些数字,这个进制就成为n的幸运数字,输出有多少幸运数字,例如19,5进制表示是34,所以5是19的一个幸运数 ...

  7. ExtJs之 Ext.JSON

    <!DOCTYPE html> <html> <head> <title>ExtJs</title> <meta http-equiv ...

  8. ExtJs之进度条实现

    慢慢按书上的作. <!DOCTYPE html> <html> <head> <title>ExtJs</title> <meta h ...

  9. [你必须知道的.NET]第三十一回,深入.NET 4.0之,从“新”展望

    发布日期:2009.05.22 作者:Anytao © 2009 Anytao.com ,Anytao原创作品,转贴请注明作者和出处. /// <summary> /// 本文开始,将以& ...

  10. PLSQL:plsql中文乱码,显示问号

    PLSQL执行sql语句,不识别中文,输出的中文标题显示成问号???? 1. 登陆plsql,执行sql语句,输出的中文标题显示成问号????:条件包含中文,则无数据输出