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

232
Views
Sigo recibiendo un error de doble clic a pesar de que el flujo es correcto
let fieldName = "" let jsonResponse = "" let collectionName = "" let fieldEl = document.getElementById("field_el") let inputEl = document.getElementById("input-el") let buttonEl = document.getElementById("button-el") let collectionData = { averagePrice: "" } const getStatsAvgPrice = { currentAP: function() { collectionData.averagePrice = jsonResponse.stats["average_price"] } } function callApi(collectionName,fieldName) { fetch(`https://api.opensea.io/api/v1/collection/${collectionName}/${fieldName}`) .then(response => response.json()) .then(response => jsonResponse = response) .then(getStatsAvgPrice.currentAP()) .then(render()) .catch(err => console.error(err)); } function render() { document.getElementById("report").innerHTML = JSON.stringify(collectionData.averagePrice); console.log(JSON.stringify(collectionData.averagePrice)) } buttonEl.addEventListener("click", () => { collectionName = inputEl.value fieldName = fieldEl.value callApi(collectionName,fieldName) })

¿Cómo puedo hacer que esto funcione? ¿Quizás hacer más funciones? Agregar al dom? Cualquier idea sería útil. Sigo recibiendo un error de doble clic a pesar de que el flujo es correcto.

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!