Print on new Blank Page
Posted: 2020-06-19 16:00
I need help,
how can I make sure that by pressing the "STAMPA" button the page is opened in a new blank page ??? the "STAMPA" page automatically creates a pdf page by script FPDF, but opens above the DV and therefore I am forced to go back with the browser's back button.
It would be more convenient to open new pages and then close it with the X.
ThankYou
$j(function(){
<?php if($selectedID){ ?>
$j('#Servizi_dv_action_buttons .btn-toolbar').append(
'<div class="btn-group-vertical btn-group-lg" style="width: 100%;">' +
'<button type="button" class="btn btn-default btn-lg" onclick="print_servizio()">' +
'<i class="glyphicon glyphicon-print"></i>STAMPA</button>' +
'</div>'
);
<?php } ?>
});
function print_servizio(){
var selectedID = '<?php echo urlencode($selectedID); ?>';
window.location = 'Servizi_stampa.php?id_servizio=' + selectedID;
}
</script>
how can I make sure that by pressing the "STAMPA" button the page is opened in a new blank page ??? the "STAMPA" page automatically creates a pdf page by script FPDF, but opens above the DV and therefore I am forced to go back with the browser's back button.
It would be more convenient to open new pages and then close it with the X.
ThankYou
$j(function(){
<?php if($selectedID){ ?>
$j('#Servizi_dv_action_buttons .btn-toolbar').append(
'<div class="btn-group-vertical btn-group-lg" style="width: 100%;">' +
'<button type="button" class="btn btn-default btn-lg" onclick="print_servizio()">' +
'<i class="glyphicon glyphicon-print"></i>STAMPA</button>' +
'</div>'
);
<?php } ?>
});
function print_servizio(){
var selectedID = '<?php echo urlencode($selectedID); ?>';
window.location = 'Servizi_stampa.php?id_servizio=' + selectedID;
}
</script>