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

139
Views
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
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!