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

144
Visualizações
automatic refresh of iframe on x seconds / restart x seconds when stop scrolling

i need to display an iframe with an automatic refresh intervall of 10 seconds. For this i use these code - it works:

But now i want to integrate that the iframe only refresh when there is no user activity on the page (scrolling, clicking). Is it possible to restart the timer when an user activity is detected?

<html>
<head>
<meta http-equiv="refresh" content="600">
</head>
<body>
<h2>Title</h2>
<iframe
  src="https://plugins.xxxx.com/embed/iframe/111111111111111111111"
  id="socialmedia"
  height="800" 
  style="display: block; border: none; width: 100%;"
  allowfullscreen>
</iframe>
<script>
window.setInterval("reloadIFrame();", 10000);

function reloadIFrame() {
 var frameHolder=document.getElementById('socialmedia');
frameHolder.src="https://plugins.xxxx.com/embed/iframe/111111111111111111111"
}
</script>
</body>
</html>
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