With the following code, it shows the print dialog and prints the page successfully, but how can I print another page after clicking on the same button? Different page name: letterprint.php
<div class="below_movie_left" id="printableArea"> My printing contents </div> <input type="button" class="submit_button" onclick="printDiv('printableArea')" value="Print" style="float:right;" /> <script> function printDiv(divName) { var printContents = document.getElementById(divName).innerHTML; var originalContents = document.body.innerHTML; document.body.innerHTML = printContents; window.print(); document.body.innerHTML = originalContents; } </script>
Is this possible with the javascript / jQuery / Ajax method? as?
source share