I have a javascript fuction which prints out a div and returns back to previous page after a delay of say 2000ms.
<script type="text/javascript">
function printDiv() {
var printContents = document.getElementById('printableArea').innerHTML;//printableArea is a div id which u need not worry
var originalContents = document.body.innerHTML;
document.body.innerHTML = printContents;
window.print();
document.body.innerHTML = originalContents;
setTimeout("closePrintView()", 2000);
}
function closePrintView() {
setTimeout("closePrintView()", 2000);
window.location = "default.aspx";
}
But i am unable to detect whether the printer has printed or still its in spooling.
I tried the afterPrint();
.but that does not give anything.
Here is my question.
Is there a java script snippet which can capture whether the printer has printed out the required information.