PDA

View Full Version : How to do script for print page?



toplisek
01-22-2006, 01:33 PM
I do not know how to do that it will open dialog box for printing particular window when user clicks on link PRINT:)

Twey
01-22-2006, 02:07 PM
<a href="javascript:void(0);" onclick="if(window.print) window.print();return false;">Print</a>

toplisek
01-22-2006, 02:19 PM
I have code to open new window



<a href="myfile.pdf" onclick="NewWindow(this.href,'Port','600','420','yes');return false;">


Is possible to add into this code also code which will open automatic print dialog box? I have code to print when user clicks on link Print:



<a href="javascript:void(0);" onclick="if(window.print) window.print();return false;">Print</a>


I can not put into href="" because there is already href="myfile.pdf"

Is this possible?