在IE6中ajaxSubmit成功回调不会触发

时间:2012-02-02 02:08:53

标签: jquery

我使用以下代码在JSP中提交表单,它可以在chrome中很好地激活,但在IE中它总是打开返回结果的新窗口,成功回调不激活

$("#imgform").ajaxSubmit({
    url : '/uc/ws/0.1/user/image/preview',
    dataType : 'text/plain',
    type : 'post',
    success : function(responseText, statusText, xhr, $form) {
        var message = eval("(" + responseText + ")");

        if (message['success']) {
            showPreview();

        } else {
            isAllowPic = false;//
            showErrorDialog('alert', '只支持最大为2M的gif、jpg、png文件', false);
        }

    },
    error : function(xhr) {
        if(xhr.responseText){
            var message = eval("(" + xhr.responseText + ")");
            if (message['success']) {
                showPreview();

            } else {
                isAllowPic = false;//
                showErrorDialog('alert', '只支持最大为2M的gif、jpg、png文件', false);
            } 
        }

    }
});

1 个答案:

答案 0 :(得分:0)

为什么要烦扰IE6?它代表了1.56%的浏览器!! http://gs.statcounter.com/#browser_version-ww-monthly-201101-201201

相反,您应该发出一个红色的华丽信号,邀请他们更改浏览器而不是鼓励他们保留它!

我们需要一起杀死剩下的IE6 !!

相关问题