Jquery.form.js upload appears $.handleerror, and $.httpdata error
Reason:
First, these two methods are not supported in later versions of jquery1.4.
Workaround:
Add to
Add the following method (in jquery.form.js):
$.httpdata=function (XHR, type, s) {
var ct = xhr.getresponseheader (' Content-type '), xml = Type = = ' xml ' | | !type && Ct && ct.indexof (' xml ') >=0, data = XML? Xhr.responseXML:xhr.responseText; if (xml && data.documentElement.tagName = = ' ParserError ')
Throw ' ParserError '; if (s && s.datafilter) data = s.datafilter (data, type); if (typeof data = = = ' String ') {if (type = = ' script ') Jquery.globaleval (data); if (type = = ' json ')
data = window["eval"] (' (' + data + ') '); } return data; };
$.handleerror= function (s, XHR, status, E) {
if (s.error) {
S.error.call (S.context | | s, XHR, status, E); }
if (S.global) {
(S.context jQuery (s.context): jquery.event). Trigger (' Ajaxerror ', [XHR, S, E]); }
}
These two functions can be.
Jquery.form attachment upload $.handleerror, and $.httpdata error causes and solutions