Page 1 of 1
print a page
Posted: Fri Mar 21, 2003 12:43 pm
by micknic
Hi guys
I would like to automaticly print a page but i ythink its not possible with PHP. I think I'm going to use a macro. Could you tell me which software tu use and were to download it?? Of course it there is an other solution don't hesitate to advice me.
Thank you
Posted: Fri Mar 21, 2003 2:29 pm
by craigh
how about clicking the print button on the browser?
print a page
Posted: Sat Mar 22, 2003 3:15 pm
by micknic
The problem is that i'm doing an web page for users who want to see a print button on the web page. I hope you can help me
Posted: Sat Mar 22, 2003 3:42 pm
by volka
unless you're using a trusted activeX-control for IE it's impossible.
Posted: Sun Mar 23, 2003 12:40 am
by spammich
Actually, it's pretty easy using javascript. Just create a button or link with an onclick event of window.print(). This will bring up the print dialog box.
Like this:
<input type="button" value="print" onclick="window.print();" />
You could also add window.print() to <body onload=""> and the print dialog will appear as soon as a page loads. This is very handy for forms/reports and stuff.
Of course, this has nothing to do with PHP.
Posted: Sun Mar 23, 2003 2:12 am
by volka

with which browser is this working?
neither does my IE nor my mozilla do anything. But maybe I deactivated something...
Posted: Sun Mar 23, 2003 2:49 am
by m3mn0n
very cool, thanks!
Posted: Sun Mar 23, 2003 4:48 am
by micknic
thanks for your help
Mickael
