42
rated 0 times
[
43]
[
1]
/ answers: 1 / hits: 22423
/ 8 Years ago, wed, november 23, 2016, 12:00:00
I am opening a new tab to display a PDF file. I have the PDF file data on a bytearray, base 64.
I am able to get the data, and display it doing this:
downloadFile(strData, name) {
var newdata = data: + application/pdf + ;base64, + (strData);
var newWindow = window.open(newdata, _blank);
newWindow.onload = function() { document.title = My title; }
return true;
}
The problem i am having is that i am not able to set the title to the new tab opened.
I would like to set a title like PDF File or just the name of the document (i am getting the file data and the file name separately and passing it to my downloadFile function.
Is there any way to set the title to this tab? Thanks in advance!
More From » html