使用ajaxfileupload插件提示Uncaught TypeError:has no method 'handleError'
最近使用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'的更多相关文章
- “Uncaught TypeError: Cannot call method 'createChild' of undefined" 问题的解决
Uncaught TypeError: Cannot call method 'createChild' of undefined 我在使用Ext 4.1.1做grid.Panel,然后chrome爆 ...
- JsBridge "Uncaught TypeError: Cannot call method 'callHandler' of undefined", source
h5和原生结合开发app越来越流行.其实就是webview 的js调用native的方法.也就是需要搭建一个桥.这样的桥早就有人搭建好了,那就是jsbridge. git地址: https://git ...
- Android WebView Error – Uncaught TypeError: Cannot call method ‘getItem’ of null at
本质原因是js 没有判断dom 是否加载完毕 其实就是在dom 加载完毕之后处理事件 wv.getSettings().setDomStorageEnabled(true); 转自 蛙齋 http: ...
- form 表单<input type="button" value="登录" onclick="loginSubmit ()"/> 点击提示 Uncaught TypeError: loginSubmit is not a function
在网上搜了一堆东东,仔细看了一下,再加上实验,发现原因出在<form>中. <form method="post"> <button type=&qu ...
- ExtJs 4.2.1 报错:Uncaught TypeError: Cannot call method 'getItems' of null
做项目的时候遇到这个问题,搞了一上午终于解决了,让我们看看是什么问题: buttons: [ { text: '保存', icon: '../../../Images/extjs/disk.png', ...
- bootstrap datepicker Uncaught TypeError: Cannot call method 'split' of undefined问题
这个问题主要是由于date对象不是字符串,不能使用 split 函数,简单处理一下,转换成字符串就可以解决问题: ++++++++++++++++++++++++ parseDate: functio ...
- 360浏览器Uncaught TypeError: object is not a function问题
刚刚360浏览器提示 Uncaught TypeError: object is not a function,找了半天发现问题是我有一个按钮,id和方法重复了,所以提示这个. <input t ...
- [Android] Web Console: Uncaught TypeError: Object [object Object] has no method 'xxx'
我们开发的产品,有一部分功能,需要在WebView中打开web页面,然后在web页面中通过js方法回调部分native的功能. 对于web回调native的开发方式,如果不了解的话,可以参考我以前的一 ...
- Uncaught TypeError: undefined is not a function
index.html <script src="resources/sap-ui-core.js" id="sap-ui-bootstrap" data- ...
随机推荐
- Ubuntu下配置Docbook环境
1.准备环境 $sudo apt-get install xsltproc $sudo apt-get install docbook-xsl $sudo apt-get install docboo ...
- mybatis sql注入安全
1.mybatis语句 SELECT * FROM console_operator WHERE login_name=#{loginName} AND login_pwd=#{loginPwd} 2 ...
- 13test02:信用卡校验
/*#include<iostream> using namespace std; void input(); int counter=0,jishu_sum=0,oushu_sum=0, ...
- Java异常类和自定义异常类
自定义异常类: public class ExtendsException extends Exception { private static final long serialVersionUID ...
- POJ 1338
#include<iostream> #include<stdio.h> #include<iomanip> #define MAXN 100000 using n ...
- Codeforces Round #263 (Div. 2) D. Appleman and Tree(树形DP)
题目链接 D. Appleman and Tree time limit per test :2 seconds memory limit per test: 256 megabytes input ...
- zoj 3057 Beans Game 博弈论
思路:三维DP,刚开始用记忆化搜索,MLE…… 后来改为直接预处理所有的情况. 总之就是必败态的后继是必胜态!!! 代码如下: #include<iostream> #include< ...
- web.xml配置bug之提示The content of element type "web-app" must match "(icon?,display- name?,description?,distributable?,
错误:配置web.xml时,出现红色叉叉,提示 The content of element type "web-app" must match "(icon?,disp ...
- ubuntu common
系统信息 # uname -a # 查看内核/操作系统/CPU信息 # cat /etc/issue # 查看操作系统版本 #cat /proc/version ...
- 分析函数(Analytic Functions)
在OLAP这类系统或者DW这类数据库中,作为某份报表的数据源,我们常常需要在某个存储过程中编写复杂的运算代码来汇总数据.分析函数便具备这样的能力,引用多行的数据值来进行多层面的聚合运算,在数据子集中进 ...