Query about window.print ...

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • June Moore

    Query about window.print ...

    Hi there,
    I have a query regarding the window.print in javascript.
    Is there a way to execute window.print() and then when the printing
    finishes, display a prompt to the user if the printing is OK?

    Thanks in advance,
    June.
  • john henry bonham

    #2
    Re: Query about window.print ...

    June Moore wrote:
    [color=blue]
    > Hi there,
    > I have a query regarding the window.print in javascript.
    > Is there a way to execute window.print() and then when the printing
    > finishes, display a prompt to the user if the printing is OK?
    >
    > Thanks in advance,
    > June.[/color]

    not *really*. the closest way to achieve this I can think of is to add
    an alert to the page focus (after the user presses "print" in IE's print
    dialogue)...

    <script>
    var printed = false;
    var n = 0;
    function check_print()
    {
    if ( printed && n < 1 )
    {
    alert( 'So, how\'d that print work out for ya?' );
    n++;
    }
    }
    </script>
    ....
    <body onfocus="check_ print();">
    <a href="#" onclick="window .print();printe d=true;return false">Test
    Print</a>
    </body>

    it's not perfect.

    Rob
    Managed IT Service Provider Optimity, enables business growth with bespoke IT solutions. Managed Networks, Cloud Hosting, Office365, VoIP, IT Support.

    Comment

    Working...