newkid
05-06-2004, 11:54 PM
I have 2 pages set up one for display and one for printing.
On the display page (partial code below) I have a button to open the printable page called (prt_cal.htm). Is there any way to have the printable page automaticaly print, right now the printable page opens and the user can right click on the page and select the print option, but I would like to have it just automaticaly print.
Such as:
onclick (window.open
what ever code to print)
or when the printable page opens
onload (what ever code print)
<HTML>
<HEAD>
<Title>Monthly Calendar</title>
<SCRIPT language="vbscript">
<!--
Sub MyPrint_onclick
window.open "prt_cal.htm","newwindow","height=500,width=500,top=50,left=50"
End Sub
-->
</SCRIPT>
</HEAD>
<BODY topmargin="0" leftmargin="0">
<td width="100%" align="center" valign="middle" height="1" colspan="6">
<img src="PrintButton.gif" width="95" height="20" Id="MyPrint">
</td>
I hope this makes sense.
Thanks
J.C.
On the display page (partial code below) I have a button to open the printable page called (prt_cal.htm). Is there any way to have the printable page automaticaly print, right now the printable page opens and the user can right click on the page and select the print option, but I would like to have it just automaticaly print.
Such as:
onclick (window.open
what ever code to print)
or when the printable page opens
onload (what ever code print)
<HTML>
<HEAD>
<Title>Monthly Calendar</title>
<SCRIPT language="vbscript">
<!--
Sub MyPrint_onclick
window.open "prt_cal.htm","newwindow","height=500,width=500,top=50,left=50"
End Sub
-->
</SCRIPT>
</HEAD>
<BODY topmargin="0" leftmargin="0">
<td width="100%" align="center" valign="middle" height="1" colspan="6">
<img src="PrintButton.gif" width="95" height="20" Id="MyPrint">
</td>
I hope this makes sense.
Thanks
J.C.