Reputation: 3856
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";
});
}
Upvotes: 0
Views: 945
Reputation: 8271
Window.open()
itself opens in new tab, Just remove "_blank". Use the below code.
(I am referring to IE 11)
window.open(url);
Upvotes: 1