drashrafsabry
Well-known member
i have a custom button to open a pdf to print using a certain template
when i click on it it generates the pdf to print in the same window , i want it to generate it in a new window
my current setup is
i have this in custom_functions.php
function dadabik_print_visit($table_name, $where_field, $where_value)
{ header('Location:index.php?tablename=Visits&function=details&export_to_pdf=1&where_field=id_visits&where_value='.$where_value.'&pdf_template=Visit'); exit(); }
and this in custom_functions.js
// function dadabik_print_requests(field) {
// window.open('index.php?tablename=Requests&function=search&export_to_pdf=1&pdf_template=RequestsPrint', '_blank');
}
when i click on it it generates the pdf to print in the same window , i want it to generate it in a new window
my current setup is
i have this in custom_functions.php
function dadabik_print_visit($table_name, $where_field, $where_value)
{ header('Location:index.php?tablename=Visits&function=details&export_to_pdf=1&where_field=id_visits&where_value='.$where_value.'&pdf_template=Visit'); exit(); }
and this in custom_functions.js
// function dadabik_print_requests(field) {
// window.open('index.php?tablename=Requests&function=search&export_to_pdf=1&pdf_template=RequestsPrint', '_blank');
}