Window Print on List Page

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
lissa
User
Posts: 19

Window Print on List Page

Post by lissa »

Hello,
I want to ask how to do it when you click print on the listpage to display the print dialog window.print().
Can you help what the code looks like for the example below, is it correct?
and where is the script placed?

if (("export") == "print") {
window.print();

arbei
User
Posts: 9384

Post by arbei »

lissa wrote:

when you click print on the listpage...

Did you mean the Printer Friendly version? If so, you can use Startup Script to add your code. You may check if the query string contains export=print to determine if it is printer friendly.


lissa
User
Posts: 19

Post by lissa »

if I press the printer friendly button it displays the print dialog. the code I want to enter is "window.print()"
how do I implement the code
Please help with sample code
Thank You


arbei
User
Posts: 9384

Post by arbei »

lissa wrote:

if I press the printer friendly button it displays the print dialog

No, if your "printer friendly button" means the button under the Export button of the List page, the it goes to the Printer Friendly page, e.g. /basepath/yourpage?export=print.

arbei wrote:

You may check if the query string contains export=print to determine if it is printer friendly.


Post Reply