Click to See Complete Forum and Search --> : Need HELP! with a "print hidden page" or "print theb close."


D.S.R.Clark
11-10-2003, 01:41 PM
I am looking for a way to print a page, that is not showing, with a buton on a main page. In a nutshell, I want to print a form from a button, without that page popping up.

If not, then I have a script that worked on my machine, but when I uploaded it to the server, part odf the script stopped working. I have set to open a very small window with the form in it as a child. A print "alert" pops up, click the button, it prints then the child window is supposed to close. And all of this is done from another child window. A real mess.

So, is there a way to: "click button", open child, open "print" dialougue, "click" button to print, child closes? I'm going nuts!

Thank you in advance for your help!

David S. R. Clark

D.S.R.Clark
11-10-2003, 02:30 PM
Here is part of the script from the pop up page with the button:

<p style="margin-top: 0; margin-bottom: 0">

<a href="http://www.elizabethstewartclarkandcompany.com/Admin/A3/B/OF/GOF.htm" 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>
<p style="margin-top: 0; margin-bottom: 0">


Here is the script from the form:

<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function printPage() {
if (window.print) {
agree = confirm('Elizabeth Stewart Clark & Company Order-by-mail. \n\n "Click" OK to print now.');
if (agree) window.print();
}
}
// End -->
</script>


<BODY OnLoad="printPage(),setTimeout(window.close, 500)" bgcolor="#FFFFFF">

Can anybody see what is wrong with this? The form is supposed to close after printing. And it did on my machine, but not once it was on the server.

Thank you in advance, David