This is my setup. I would love to be able to
print a form with a button while on a parent page. But, I’ve been told
that that cannot occur. So, I have a parent page that has selections in
a drop-down menu. One of the choices is to print an order form. A small
pop-up window comes up that contain a button. “Click” the button the
pop-up closes, a small window containing the form pops up, and a print
alert pops up. At the completion of the print the window is supposed to close
automatically. And believe it or not it actually worked; on my machine.
But when I up-loaded it, things stopped working. The ONLOAD tag has a
timeout that is supposed to close the window but does not. Is there
another string that can be used, like “onPrint.close” or something like
that? Here is the script from the pop-up page, and the form I want to
print:
<p style=”margin-top: 0; margin-bottom: 0″>
<a
href=”
tm”
onclick=”window.open(this.href, ‘child’,
‘height=100,width=100,TOP=0,LEFT=0’); window.close(); “>
<INPUT TYPE=”button” VALUE=”Print Order Form !”></a></p>
<HEAD>
<SCRIPT LANGUAGE=”JavaScript”>
<!– Begin
function printPage() {
if (window.print) {
agree = confirm(‘Elizabeth Stewart Clark & Company Order-by-mail. nn
“Click” OK to print now.’); if (agree) window.print();
}
}
// End –>
</script>
</HEAD>
<BODY OnLoad=”printPage(),setTimeout(‘window.close’,1000)”
bgcolor=”#FFFFFF”>
These are all of the pertinent areas, I think. I would really appreciate
it if you would take a look at this for me. Thank you for your help!