RIRedinPA Posted October 16, 2009 Share Posted October 16, 2009 I have a site that allows users to print selected pages or all pages from an e-book using just javascript. In a nutshell I gather what pages they want to print out, grab the jpeg files that make up those pages, write them to a page using CSS to insert page breaks and then pop up the print dialog window for them. Works fine. What I'd like to do is reset the page back to the print pages selection form once they have sent the page to the printer, usng a window.location.reload(true) call. Problem is I get an error message: The document cannot change while printing or in print preview. Is there a way I can get some sort of return that the print dialog window has been closed and that all the pages have been sent to the printer? I'd like to do something like: if (window.print.SOMETHING_I_CAN_CHECK == true) { window.location.reload(true); } Quote Link to comment https://forums.phpfreaks.com/topic/177945-javascript-print-dialog-window/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.