dcsimg
www.webdeveloper.com
Results 1 to 2 of 2

Thread: Need HELP! with a "print hidden page" or "print theb close."

  1. #1
    Join Date
    May 2003
    Location
    Idaho Falls, Idaho
    Posts
    43

    Question Need HELP! with a "print hidden page" or "print theb close."

    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

  2. #2
    Join Date
    May 2003
    Location
    Idaho Falls, Idaho
    Posts
    43
    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

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles