2012-11-26 33 views
0

不工作我使用Malsup's jquery form plugin上傳使用jQuery插件的Ajax圖像中的IE

我有這樣的代碼。

$(document).ready(function() { 
     jQuery("input[name=file]").change(function(e){ 
      if(browserType == "MSIE"){ 
       jQuery("#start_campaign").ajaxForm({ 
        target: '.imgPreview', 
        url: host+"/forms/campaign-image-upload.php?action=ajaxUploadImage", 
        beforeSend: function() { 
         console.log(2); 
        }, 
        success: function(responseText,statusText,xhr,$form) { 
         alert('status: ' + statusText + '\n\nresponseText: \n' + responseText + 
         '\n\nThe output div should have already been updated with the responseText.'); 
        } 
       }).submit(); 
      } else { 
       readURL(this); 
      } 
     }); 
    }); 

它的運行對beforeSend功能,但在這之後它有這樣那樣的錯誤:

SCRIPT3: Member not found. 

jquery.form.js, line 349 character 5 
LOG: [jquery.form] state = complete 

這是行349: enter image description here

什麼是與此代碼的問題?我一直在網上搜索,沒有找到答案。

您的幫助將不勝感激和回報!

謝謝!

回答

0

同樣的錯誤在我的項目也來我becuse有觸發標籤文件上載控制。

如果有觸發文件上傳控件像DIV或其他等元素,如果是的話,請刪除到文件,在IE上載控制和簡單的顯示文件上傳控制觸發然後上傳圖片,將很好地工作。

請試試這個。

對不起,我的英語不好

相關問題