Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

132
Views
Window.open and window.print blocking JavaScript

I have a site where a particular page has two buttons that open pages in new tabs. One page is a preview of an item, and one is the print of that item.

// Preview button's click event
window.open('my.preview.url.com', 'preview');

// Print button's click event
window.open('my.print.url.com, 'print');

On the print page, window.print(); is call on page load.

This seems to create a bit of an issue on some browsers. Opening the print page and not closing the print preview results in all of the JavaScript being blocked on the originating page (with the buttons) and the preview page (if one had been opened previously).

This appears to not happen in all browsers. For example, Chrome displays the issue but Firefox does not.

This is similar to a similar unanswered post, which has a useful fiddle at http://jsfiddle.net/Zicane/7ntsb7hh/10/

Hoping someone might know the solution to both issues.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!