Home » Internet » How to download or print a page using PHP and javascript

How to download or print a page using PHP and javascript

jQuery(‘.payment-print’).live(‘click’, function() {

var sUrl = jQuery(‘#base-url’).val() + ‘/jobs/paymentprint/id/’ + jQuery(this ).attr(“id”);
jQuery.post(sUrl, function(data){
var HTML = data;
var WindowObject = window.open(” “, “PrintWindow”, “width=769,height=601,top=40,left=40,toolbars=no”);
WindowObject.document.writeln(HTML);
WindowObject.document.close();
WindowObject.focus();
WindowObject.print();
WindowObject.close();
})

});

Leave a Reply

x

Check Also

How to delete your whatsapp status

WhatsApp is a famous messaging App on the internet. Now Facebook is managing Whatsapp. Whatsapp is ...