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

116
Visualizações
Can't load website on iframe tag using javascript

I am trying to let my iframe tag load a webpage for a give time HTML:

<div id="banner">
         
<iframe src="" id="adsm">

          

       
 </iframe>
         
 </div>
<Button onclick="view()" id="major">watch</button>

The javascript:

function view(){
var presenttime=11;
var nextmine=8;
if(presenttime>=nextmine){
      //give a src to the adsm watch section
      //start setting for the countdown
      var timeLeft = 30;
      var timerId = setInterval(countdown,1000);
      function countdown(){
    var value=document.getElementById("count-down");
      document.getElementById("major").onclick="";
       if(timeLeft == -1){
         clearTimeout(timerId);
         document.getElementById("adsm").src="";
         document.getElementById("banner").innerHTML="please try later";
       }
       else{
      var link="https://doomdefender.com/e9k6bqg3y?key=7089140f45b4fcfdb51fb18ec1ead1cc";
  document.getElementById("adsm").src=link;
         document.getElementById("adsm").style.display="block";
         timeLeft--;
      value.innerHTML = timeLeft + ' seconds remaining';
         
       }
        
      }
    }
    else{
      document.getElementById("adsm").style.display="none";
         document.getElementById("banner").innerHTML="please try again later";
    }
}

At the end I it doesn't even display anything, I created another project with and tried a similar function and it worked please someone should run the code for me and tell me what's wrong

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