Hi all
A page is built programatically and the logic to built and to display the page has been put into <span> tag. On clicking a button, it should open a new window with all the information within <span tags.
This works some times and some times, it just opens a blank window.
<script language="javascript">
function PrintFriendly(){
a = window.open('', 'mycal', 'height=350,width=700,menubar=1,resizable=1,scrollbars=1,top=0,left=0');
a.document.body.innerHTML = Printpage.innerHTML;
}
</script>
<span id="Printpage">
----- Logic and display for the page -----
</span>
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td colspan="7" align="center">
<button onclick="PrintFriendly()">Print </button>
</td>
</tr>
</table>
Any ideas are much appreciated?
Thanks
A page is built programatically and the logic to built and to display the page has been put into <span> tag. On clicking a button, it should open a new window with all the information within <span tags.
This works some times and some times, it just opens a blank window.
<script language="javascript">
function PrintFriendly(){
a = window.open('', 'mycal', 'height=350,width=700,menubar=1,resizable=1,scrollbars=1,top=0,left=0');
a.document.body.innerHTML = Printpage.innerHTML;
}
</script>
<span id="Printpage">
----- Logic and display for the page -----
</span>
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td colspan="7" align="center">
<button onclick="PrintFriendly()">Print </button>
</td>
</tr>
</table>
Any ideas are much appreciated?
Thanks