Alert:The document cannot change while Printing...

  • Posts: 112
  • Thank you received: 0
13 years 5 months ago #19762

Hi,

I am getting the alert: "The document cannot change while Printing or in Print Preview" when I do the following steps:

Open an order invoice page, click on print button, cancel, go back on user panel page and when I try accessing any page from the user panel page - the alert popups. I also noticed that if I cancel printing, the browser window stays in loading mode. I now can not stop it popping up!

Is there a way to fix or disable the alert?

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
13 years 5 months ago #19773

We didn't had that problem in our tests. Could you try on our demo website to see if you have the problem there too ?

If so, could you give the browser your using ? Could you try with another browser ?

Otherwise, could you give an access to these pages on your website so that we can see the problem (you can use the contact form in that case) ?

Please Log in or Create an account to join the conversation.

  • Posts: 112
  • Thank you received: 0
13 years 5 months ago #19780

In your demo you don't seem to give access to user orders page where a user could print an invoice - that's were the issue occurs.

I've tried in IE9 - the issue didn't happen. It happened in Firefox 4.0.1. But after I ran upgrade to 5.0 the issue resolved by itself. Weird...

Thank you for your help.

Last edit: 13 years 5 months ago by lrazov.

Please Log in or Create an account to join the conversation.

  • Posts: 82868
  • Thank you received: 13376
  • MODERATOR
13 years 5 months ago #19790

We also did some search on our end. It's indeed a problem which appears in Firefox sometimes: geekswithblogs.net/leesblog/archive/2009...-my-hiney-today.aspx

Apparently, the solution is to increase the delay of the popup closing. You can do that by changing the line:
$js = "do_nothing( function() {window.print();setTimeout(function(){try{ window.top.document.getElementById('sbox-window').close(); }catch(err){ window.top.SqueezeBox.close(); }}, 50);});";

to:
$js = "do_nothing( function() {window.print();setTimeout(function(){try{ window.top.document.getElementById('sbox-window').close(); }catch(err){ window.top.SqueezeBox.close(); }}, 4000);});";

in the file components/com_hikashop/views/order/view.html.php

Please Log in or Create an account to join the conversation.

Time to create page: 0.058 seconds
Powered by Kunena Forum