2

当您按下上传按钮或取消时,我收到了该错误。但是其他没有上传的可编辑字段工作正常。使用: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..."
     });
});
4

1 回答 1

1

$(原始).html(数据); - 检查数据状态,mb 它是空的

于 2012-12-19T10:53:00.010 回答