0

I am downloading a file using javascript and opening it in new table by using window.open(). it is working fine in chrome and firefox but it in IE11 it loggedout the user and sends on login page.

my code is as below

   AddToolService.onDownloadFileSuccess('GET', 'WebServices/toolService.asmx/downloadFile?listTitle=' + listTitle + '&FileLeafRef=' + FileLeafRef).then(function () {            
    window.open(FileApplicationPath, '_blank');
    console.log(FileApplicationPath);
    document.getElementById('downloadbar').style.display = "none";
});

}
Nitu Bansal
  • 3,826
  • 3
  • 18
  • 24

1 Answers1

1

Window.open() itself opens in new tab, Just remove "_blank". Use the below code. (I am referring to IE 11)

 window.open(url);
Krsna Kishore
  • 8,233
  • 4
  • 32
  • 48