From 9481c43da552db4e77978e6640f638e306075085 Mon Sep 17 00:00:00 2001 From: "juhasz.sandor@lonalore.hu" Date: Tue, 8 May 2018 10:27:24 +0200 Subject: [PATCH] Possible fix for issue #38 --- jquery.printPage.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/jquery.printPage.js b/jquery.printPage.js index 37a84a3..9834e94 100644 --- a/jquery.printPage.js +++ b/jquery.printPage.js @@ -80,11 +80,17 @@ * Call the print browser functionnality, focus is needed for IE */ function printit(){ - var selector = 'printPage' + pluginOptions.id; frames.printPage.focus(); - frames.printPage.print(); + + if (document.queryCommandSupported("print")) { + frames[0].document.execCommand("print", false, null); + } + else { + frames.printPage.print(); + } + if(pluginOptions.showMessage){ unloadMessage(); }