Its well known that there is no way to determine whether a user clicked print or cancel on the print window produced by window.print().
So Im stuck with the next best thing which is to basically ask the user if they did print successfully.
I have this:
$(document).ready(function(){
window.print();
var a = confirm('Confirm printing as successfull and mark Job Cards as Released?');
if(a == true) {
$.post('PrintSuccess');
window.location = '/Menu';
}
});
Trouble is, the confirmation box pops up before the print window does, how can ensure the print window appears first?