Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

215
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda