I have defined onbeforeprint
and I modify my html code and now once I finish printing that is on select of print button I want the onafterprint
to be fired but it does not.
Instead when I press the Control + Print button the onbeforeprint
is fired first and then the onafterprint
event and then print dialog is shown.
Is there any way I could in some way do changes to my html after the Print button is clicked?
Am using IE -9 browser and the code is as follows:
Code
<script type="text/javascript">
window.onbeforeprint = function () {
alert('Hello');
}
window.onafterprint = function () {
alert('Bye');
}
</script>