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

94
Visualizações
js update page from two iframes

ok so i have two iframes, one iframe has a auto refresher one doesn't, the one with a auto refresher would get the newest updates to the file and i want js to match them against each other and execute if there has been a change, they both have the same src please help me the code is below

<iframe src="messages.txt" height="100%" width="100%" id="frame"></iframe>
<iframe src="messages.txt" height="100%" width="100%" id="frame1"></iframe>
<p>

<script>
  
  var iframeContent = getElementById('frame1').contentDocument;
  
  setInterval(function () {
  
      var iframeContent1 = getElementById("frame").contentDocument;
  
      if(iframeContent1 !== iframeContent) {
  
          window.location.href= './';
      }
  }, 1000);
  </script>


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