当您按下上传按钮或取消时我收到了该错误。但其他没有上传的可编辑字段工作正常。 使用: Jeditable - jQuery就地编辑插件版本1.7.1
不知道该怎么办。 谢谢你的回答。
$.editable.addInputType('ajaxupload', {
/* create input element */
element: function (settings) {
settings.onblur = 'ignore';
var input = $('<input type="file" id="upload" name="upload"/>');
$(this).append(input);
return (input);
},
content: function (string, settings, original) { /* do nothing */ },
plugin: function (settings, original) {
var form = this;
form.attr("enctype", "multipart/form-data");
$("button:submit", form).bind('click', function () {
$.ajaxFileUpload({
type: 'POST',
url: "/EZhandler.ashx?exId=" + GetExhibitorId() + "&exhibitionId=" + GetExhibitionId()+"&type=logo",
secureuri: false,
fileElementId: 'upload',
dataType: 'json',
success: function (data, status) {
$(original).html(data);
original.editing = false;
location.reload();
},
error: function (data, status, e) {
alert(e);
}
});
return (false);
});
}
});
$(document).ready(function () {
$('.logo').editable(function (value, settings) {
return value;
},
{
type: 'ajaxupload',
submit: 'Upload',
cancel: 'Cancel',
style: 'inherit',
tooltip: "Click to upload..."
});
});
答案 0 :(得分:1)
$(原始)的.html(数据); - 检查数据状态,mb为空