Reputation:
I was printing my site page using the code below:
window.print();
How will I know if the page was successfully/not successfuly printed by the printer? The reason why I want to do this is "to avoid reprinting the page twice". Each successful print is quite expensive in my case because I am printing an ID.
I am looking for all browser compatible solution. Thank You.
Upvotes: 2
Views: 950
Reputation: 13703
There is no event which is available to track anything that has happened in the print dialog.
However there are events
Both of them only work in firefox+6 I believe and higher versions of IE
Upvotes: 0
Reputation: 3585
Can't do that :/
There is window.onafterprint handler, but it is fired both when the user prints or aborts a print dialog. And it is not widely implemented too.
P. S. I don't see why you would want to know whether a print took place or not.
Upvotes: 1