Hi
I have used Bob's jQuery form print routine. I have simplified the code for my purpose and have attached a copy. I have commented out the window and document close options so that I can see the output.
My problem is that, while the print routine works fine on some web browsers (Internet Explorer, Firefox & Firefox Developer) (see attached) it will not for other browsers (Edge, Chrome or Opera). In the case of Edge, Chrome or Opera in some cases nothing is displayed. In others - Chrome for example blank pages are displayed. See attached
The form is accessible here
I am quite stuck. Any help???
Regards
Nick
I have used Bob's jQuery form print routine. I have simplified the code for my purpose and have attached a copy. I have commented out the window and document close options so that I can see the output.
My problem is that, while the print routine works fine on some web browsers (Internet Explorer, Firefox & Firefox Developer) (see attached) it will not for other browsers (Edge, Chrome or Opera). In the case of Edge, Chrome or Opera in some cases nothing is displayed. In others - Chrome for example blank pages are displayed. See attached
The form is accessible here
I am quite stuck. Any help???
Regards
Nick
Update: There could be some oddities there. Seems OK on Edge but suddenly two copies printed and format gone awry> 🙄
Hi Nick,
In Chrome the form loads into the Print Window correctly but the Print Command then shows empty pages. if you cancel the print then you can see the form and ctrl+p will print it correctly, I wonder if this is a timing problem of some kind? If you delay the print half a second does that make any difference?
Bob
In Chrome the form loads into the Print Window correctly but the Print Command then shows empty pages. if you cancel the print then you can see the form and ctrl+p will print it correctly, I wonder if this is a timing problem of some kind? If you delay the print half a second does that make any difference?
Bob
Hmmm! The right track I think. But probably the wrong jQuery code.
If I make the print line read
then the window does display but it never then comes out and executes the print.
Is that the correct way to add the delay? I tried adding it as just
ahead of the print but no better.
Nick
If I make the print line read
printWin.delay(500).print();
then the window does display but it never then comes out and executes the print.
Is that the correct way to add the delay? I tried adding it as just
printWin.delay(500);
ahead of the print but no better.
Nick
Morning
I have been struggling with Bob's print routine - it works fine apart from the Chrome/Opera problems mentioned. But getting the correct css into place for each form has been a struggle.
This solved my problem.
http://www.codexworld.com/print-specific-area-of-web-page-using-jquery/
It requires no specific references to my CSS - must pick it up from the page - and works fine with Chrome.
Worth a look.
Regards
Nick
I have been struggling with Bob's print routine - it works fine apart from the Chrome/Opera problems mentioned. But getting the correct css into place for each form has been a struggle.
This solved my problem.
http://www.codexworld.com/print-specific-area-of-web-page-using-jquery/
It requires no specific references to my CSS - must pick it up from the page - and works fine with Chrome.
Worth a look.
Regards
Nick
Anyone have a solve to this? The print button used to work, but no longer appears, and throws the following on the page...

This topic is locked and no more replies can be posted.