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

153
Views
Cómo imprimir otra página con un botón usando ajax

Me pregunto cómo imprimir otra página sin necesidad de ir a la página determinada que necesito imprimir con un botón.

Tengo una página llamada Recibos, ya tengo el botón Imprimir. Al hacer clic en la impresión, quiero imprimir otra página llamada Print.php que está allí.

Aquí está mi código Ajax:

 // Update bill status and print $(document).on('click', '.update_status', function(e){ e.preventDefault(); var ordernum=$(this).data("id"); $.ajax({ url:"pages/UpdateBillStatus.php", method:"POST", data:{ordernum:ordernum}, success:function(data){ document.getElementById('status'+ordernum).innerHTML = data; // This is the part that I wrote but it still open the Print.php page then print var printWindow = window.open('http://localhost/LaLigaCafe/pages/Print.php?ordernum='+ordernum+''); printWindow.print(); } }); });

Entonces, lo que necesito es imprimir la página sin necesidad de ir allí, solo imprimiendo en mi página actual.

Gracias de antemano chicos.

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!