jeudi 20 janvier 2022

refresh iframe on checkbox in timer

i have some checkboxes which i want to execute some code each second, the code inside the timer, which is inside of the if checked == true, it sets the src to be the same which i want it to refresh the iframe getting the new content on the iframe's website, the checkboxes are for different timers to reset the iframe, can u see whats stopping it executing, the code below;

if (document.getElementById("1").checked == true) {
  

setTimeout(function () {
  f.src = f.src;
    }, 100);
  }
  if (document.getElementById("2").checked == true) {
  

  setTimeout(function () {
    f.src = f.src;

      }, 5000);
    }



Aucun commentaire:

Enregistrer un commentaire