2012-02-02 33 views
-1

我用下面的代碼在JSP提交表單,它可以在鉻火很好,但在IE總是打開新窗口,返回結果,成功回調不火ajaxSubmit會成功回調不火的IE6

$("#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); 
      } 
     } 

    } 
}); 
+0

請出示您的表格。你有任何錯誤? – 2012-02-02 02:15:49

回答

相關問題