2014-04-19 81 views
0
function myPage() { 
     var url1 = "imagefile="+"img/"+ absPath; 

     $.ajax({ 
      type : "POST", 
      url : "fileupload.action", 
      data : $('#uploadImagess').attr('mynewfile'), 
      success : function(data) { 
       alert("success Insert : "+filePath); 

      }, 
      error : function(data) { 
       alert("ERROR IN SAVE DATA"); 
      } 

     }); 
} 
+0

評論此代碼,並找到解決方案我 – sagar

+0

如何找到源文件的AJAX拋出 – sagar

回答

1
$(document).ready(function(){ 
    $('input[type="file"]').ajaxfileupload({ 
      'action': 'imageupload.action',    
     'onComplete': function(response) {    
      $('#upload').hide(); 
      alert("File SAVED!!"); 
      }, 
      'onStart': function() { 
      $('#upload').show(); 
      } 
    }); 
}); 
</script> 
+0

這個代碼是完美的作品我的應用程序 – sagar