5

In my web app i want to integrate a print functionality. When the user clicks the print button, a new window is opening and the print dialog appears. With this code i want to achieve this:

    var win = window.open(url, '_blank');
    win.print();

It is working, but the problem is that in chrome the source window stops the javascript execution while the print dialog is open. How is it possible to prevent this?

6
  • Can you share the complete code? Commented Nov 27, 2014 at 11:28
  • possible duplicate of How can I create an Asynchronous function on Javascript? Commented Nov 27, 2014 at 11:28
  • 1
    Here is an example code: jsfiddle.net/Zicane/7ntsb7hh/10 Commented Nov 27, 2014 at 11:59
  • 1
    @Zicane how to you fixed this problem? Commented Sep 21, 2017 at 21:36
  • @Andy, did anyone of you found a solution to this? Commented Aug 3, 2018 at 10:54

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.