PDA

View Full Version : window.open() not working for files other than jpeg in IE8



raj542
9 Dec 2012, 11:18 PM
Hi all,

Code:
window.open("Rest resource path" +"_blank");
opens only jpeg files, gives error when try to open files other than jpeg.

please let me know how to solve this issue.

Thanks,
Raj

raj542
10 Dec 2012, 2:17 AM
Hi all,


This code can be used instead of window.open() method which works fine in all browsers as window.open() gives problem in IE8.


Code: var downloadUrl = "../../rest/docspace/folders/" + folderId + "/files/" + rows[0].data.id + "/download";
var downloadFrame = document.createElement("iframe");
downloadFrame.setAttribute('src',downloadUrl);
document.body.appendChild(downloadFrame);