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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.