Streetdaddy
Programmer
Lets say I have a page with a whole lot of HTML and part of it is inside:
Then I have this function to open a new window and put the innerHTML of printArea in it.
It looks find in IE (ofcourse) however in Netscape 7, after the new window reloads there are strange characters showing up.
Also, if I try to include a linked stylesheet in IE it is fine as the 'location' of the new window is the same as its parent, so it can link a stylesheet with no problems. But in NS7, it doesn't seem to be able to link to the stylesheet.
Does anyone have any tips about this?
Miles
Those Micros~1 guys sure know what they doing!
Code:
<span id="printArea">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<th colspan="5">Hello World</th>
</tr>
<tr>
<td width="25%" class="GRIDLB">Family</td>
<td class="GRID" width="25%">Smith</td>
<td width="30%" class="GRIDLB">Number of Customers</td>
<td width="20%" class="GRID">
<div align="right">25</div>
</td>
<td class="GRID"> </td>
</tr>
<tr>
<td class="GRIDLB">Family</td>
<td class="GRID">Jones</td>
<td class="GRIDLB">Number of Children</td>
<td class="GRID">
<div align="right">1291</div>
</td>
<td class="GRID"> </td>
</tr>
<tr>
<td class="GRIDLB">Year</td>
<td class="GRID">01 Jul to 30 Jun</td>
<td class="GRIDLB">Bones</td>
<td class="GRID">
<div align="right">1.4</div>
</td>
<td class="GRID">Km</td>
</tr>
</table>
</span>
Then I have this function to open a new window and put the innerHTML of printArea in it.
Code:
function printPage() {
var sContent = document.getElementById('printArea').innerHTML;
printWindow = window.open('', 'printWindow', 'scrollbars=yes,resizable=yes,toolbar=yes,status=yes,menubar=yes,location=yes');
printWindow.document.write(sContent);
printWindow.location.reload();
}
It looks find in IE (ofcourse) however in Netscape 7, after the new window reloads there are strange characters showing up.
Also, if I try to include a linked stylesheet in IE it is fine as the 'location' of the new window is the same as its parent, so it can link a stylesheet with no problems. But in NS7, it doesn't seem to be able to link to the stylesheet.
Does anyone have any tips about this?
Miles
Those Micros~1 guys sure know what they doing!