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

183
Views
get Json data (Showing error - 'Request is not excuted')

get Json data (Showing error - 'Request is not excuted') How to make a request executed code.

country.js

$("#btn-id").click(function() {
 //get data    
$.getJSON("https://reqres.in/api/users?page=2", 
function(json) {
//Empty div if clicked agian
$("#data-id").html('')
//loop through it
json.data.forEach(function(jd) {
  //append data in div 
  $("#data-id").append(jd.id + "--" + jd.email + '<br>');
})
});
});

HTML FILE

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
  <title>The jQuery Example</title>
  <script src="country.js"></script>
 </head>

  <body>
<form>
  <input type="button" id ="btn-id" value = "Click to Load Data"  />
   <div id="data-id"></div>
   </form>
   
   <script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
    <script src="country.js"></script>

   </body>
 </html>

get Json data (Showing error - 'Request is not excuted') How to make a request executed code.

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!