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

406
Views
window.addEventListener (función 'cargar' ()) no funciona

Tengo una página con muchos artículos, ahora al hacer clic en un artículo necesito abrir una nueva ventana (compare.html) y mostrar sus especificaciones. He construido una matriz para que mi html se procese y funciona bien si se muestra en la misma página pero en una nueva ventana para que el html se procese. Usé window.addEventListener ("cargar", función ())

Aquí está el código que usé: -

 rendered = compareTpl(articleObj); // this contains the html block, var w = window.open("compare.html", "compare", "width=960, height=800, scrollbars=yes"); w.addEventListener("load", function() { w.document.getElementById("mdpo").innerHTML = rendered; // I am placing my html inside the div(mdpo) content of compare.html page });

Funciona bien para un solo clic en el artículo, pero en el siguiente clic la página se queda en blanco.

Por favor, ayúdame con esto

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!