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

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