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

157
Visualizações
JavaScript Redirect In Drupal Does Not Redirect Out of iFrame

I am trying to breakout of an iFrame after a form is submitted. After the form is submitted it should end up at example.org/thankyou, for example. I have tried various options but I think the best way to do it is to navigate to a controller and then have that controller load JavaScript for the redirect.

I have tried both window.parent.location.href = "https://example.org/" and window.parent.location = "https://example.org/" in the JavaScript and neither of them work. They do not appear to do anything. There are no JavaScript errors in the Chrome DeveTools.

My custom JavaScript that I am loading in the controller is in the JS that is delivered when the page is loaded. This is verified by loading the JS file through the ChromeDevTools.

The code is loaded at the end of the HTML document. I am almost wondering if this is being called to late in the page render process.

Any help is greatly appreciated.

Thanks!

about 4 years ago · Santiago Trujillo
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