Latest news
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

Li fi

Wi-Fi is changing to High speed LiFi(Light Fidelity) Technology

As per the high demands of wireless communication data transfer, there are huge new technologies ...