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

212
Views
Can't redirect to new tab from PDF using target='_blank' in Broswers

I don't know whether this is valid or not. I went through some links and tried many solutions but none of them are working.

I have a pdf with some links and then click on that link it has to open a new tab in the browser and do some functionality after that tab has to be closed automatically.

<a target="_blank" href="http://your_url_here.html">Link</a>

I updated the link in the PDF as like that and window.close() is completing the functionality.

It is perfectly working fine when we open the pdf from ADOBE or Foxit Reader or any other PDF reader. But the problem is all the latest browsers have the support to view the PDFs files in them. When the link is clicked, that's getting redirected on the same tab and the window.close() is throwing the below error.

"Scripts may close only the windows that were opened by it."

I am not exactly sure whether browser PDF viewers have the support or not. Can somebody help me with this problem or have any idea if this can be achieved?

Test Video

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!