PHP/Javascript: print preview selected page
Posted: Wed Jan 11, 2012 10:08 am
hi,
i need to open a print preview page and only display the contents of a defined page. Currently i'm using the following code, but it opens a print preview window of the current page, not the page defined in the href. Does anyone have any ideas on how to resolve this?
Thanks
i need to open a print preview page and only display the contents of a defined page. Currently i'm using the following code, but it opens a print preview window of the current page, not the page defined in the href. Does anyone have any ideas on how to resolve this?
Code: Select all
<?php
echo '<td nowrap><a href="print_preview_invoice.php?ID_Number=' . $ID_Number . '&inv_num=' .$result['Inv_Num'].'" target="_blank" onclick="print();">'.$invoice.'</a>' . " / " . '<a href="print_preview_timesheet.php?ID_Number=' . $ID_Number . '&inv_num=' .$result['Inv_Num'].'" target="_blank" onclick="print();">'.$timesheet.'</a></td>';
?>