When I print page with window.open()
method in Safari browser, below contents are default showing.
----------------------
| title date |
| |
| |
| |
| contents |
| |
| |
| |
| about:blank 1/1 |
----------------------
I understand about:blank
is url part, but there is no url because I open this screen with window.open()
with print
option. How can I change this to another string?
var contents = printContents();
var printWindow = window.open('','print', 'height=400,width=600');
printWindow.document.open();
printWindow.document.write('<html><head><title>' + title + '</title>');
printWindow.document.write('</head><body>');
printWindow.document.write(contents);
printWindow.document.write('</body></html>');
printWindow.document.close();
printWindow.print();
printWindow.close();