I want to do download a file after Ajax request,so i use "window.location.href= "url../data.dat" "
to download the file in the Ext.Ajax.request 'success' ,but the IE8 always pod-up a tip : "To help protect your security, Internet Explorer blocked this site from downloading files to your computer",
but if i use 'window.location.href = url' outside the ajax request ,that OK(IE8 no pop up the tip ),
somebody know why ?or have some solution to avoid the pop-up ?
I do not want to modify the IE8 setting ,because this is not a good solution for user.
Why the IE8 can not download file in the Ajax.request event 'success'?
to download the file in the Ext.Ajax.request 'success' ,but the IE8 always pod-up a tip : "To help protect your security, Internet Explorer blocked this site from downloading files to your computer",
but if i use 'window.location.href = url' outside the ajax request ,that OK(IE8 no pop up the tip ),
somebody know why ?or have some solution to avoid the pop-up ?
I do not want to modify the IE8 setting ,because this is not a good solution for user.
I use like this:
Ext.Ajax.request({
scope :this,
timeout:60000,
//async:false,
url: 'data/test.json',
success:function(response){
window.location.href= "url.../data/data.dat";
}
});
Why the IE8 can not download file in the Ajax.request event 'success'?
Aucun commentaire:
Enregistrer un commentaire