Query about window.print ...

J

June Moore

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.
 
J

john henry bonham

June said:
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.

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();printed=true;return false">Test
Print</a>
</body>

it's not perfect.

Rob
http://www.avagio.co.uk
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top