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

179
Views
problema para cargar datos desde un archivo .js

Estoy tratando de ejecutar una página web con ese archivo js, por alguna razón, no quiere funcionar y cuando pruebo la consola dice "Recarga en vivo habilitada". Alguien sabe como puedo solucionar ese problema? .

 const container = document.querySelector('.datalink') let listdata = async() => { let url = ' http://localhost:3000/indusboards'; const urlfetch = await fetch(url); const urlfound = await urlfetch.json(); let template = ''; datafound.array.forEach(element => { template += ` <div class ="element"> <p><small>${element.serialno}</small></p> <p><small>${element.boardtest}</small></p> <p><small>${element.testresul}</small></p> <p><small>${element.serialno}</small></p> <p><small>${element.testdate}</small></p> <p><small>${element.testtime}</small></p> <p><small>${element.boardlocation}</small></p> <a href = "/json_projet/details.html">.... more</a> </div> ` }) container.innerHTML = template; } window.addEventListener('DOMContentLoarded', () => listdata());
about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

Cometió un error ortográfico, cambie su código a.

window.addEventListener('DOMContentLoaded', () => listdata());

En vez de

window.addEventListener('DOMContentLoarded', () => listdata());

o podrías usar

 window.onload = () => { listdata() }
about 4 years ago · Juan Pablo Isaza Report

0

¿Qué tal esto?

 const container = document.querySelector('.datalink') let listdata = async() => { let url = ' http://localhost:3000/indusboards'; const urlfetch = await fetch(url); const urlfound = await urlfetch.json(); let template = ''; datafound.array.forEach(element => { template += ` <div class ="element"> <p><small>${element.serialno}</small></p> <p><small>${element.boardtest}</small></p> <p><small>${element.testresul}</small></p> <p><small>${element.serialno}</small></p> <p><small>${element.testdate}</small></p> <p><small>${element.testtime}</small></p> <p><small>${element.boardlocation}</small></p> <a href = "/json_projet/details.html">.... more</a> </div> ` }) container.innerHTML = template; } window.addEventListener('DOMContentLoaded', () => listdata());
about 4 years ago · Juan Pablo Isaza Report
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!