Community Forum

Printing of the previous document is still in progress

Profile Image 2 Posts 2 Karma
Beachcomber posted this 02 December 2013

Any ideas why I get this error when trying to print?  If, while debugging, I continue over this error the printing does get done, but this isn't the case in the non-debugging mode.

 

The code is:

            <tr class="singlebuttonrow"><td><input type="button" class="submit-button" onclick="CheckOrder('AUDI','N');removePageBreak('documents');factory.printing.Print(true, window);" style="cursor:pointer;" value="Print Documents" />

and it objects to the factory.printing.Print(true, window) line.

Declaration of the factory object, done in the <head> of this page, is:

     <object id="factory" viewastext style="display:none" classid="clsid:1663ed61-23eb-11d2-b92f-008048fdd814" codebase="http://localhost:99/dweb/scriptX/7,2,0,36/smsx.cab#Version=7,2,0,36"></object>

I'm new to ScriptX, so any clues would be very much appreciated.
Thanks
Beachcomber
Profile Image 2 Posts 2 Karma
Beachcomber posted this 02 December 2013

Further info - if I change 

factory.printing.Print(true, window);

to 

window.print()

then I don't get any error (and I do get the print that I expect...)

Profile Image 189 Posts 189 Karma
Jerry posted this 02 December 2013

HI

 

What you're seeing is a ScriptX warning that's telling you that the print jiob is still spooling at the point at which you're trying to navigate the page or close the browser window.

 

In licensed use we make the useful function WaitForSpoolingComplete() available to control that.

 

In 'free' use you'll need to work up a suitable timeout after your Print call and before your navigation .

Post Edited 02 December 2013