Jump to content

Javascript print dialog window


RIRedinPA

Recommended Posts

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);
}

 

Link to comment
https://forums.phpfreaks.com/topic/177945-javascript-print-dialog-window/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.