Link to home
Start Free TrialLog in
Avatar of Richard Coffre
Richard CoffreFlag for France

asked on

How to directly print a HTML file from another ?

Hi all,

How can I do to print a HTML file from another one ?
For example, in the file index.html, I want a link to print directly the file "to_print.html" with or without confirmation.

TIA
ASKER CERTIFIED SOLUTION
Avatar of minichicken
minichicken

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Richard Coffre

ASKER

Can we automate the closing of the window after the printing ?
Avatar of minichicken
minichicken

you can use window.close(); but i think it will do a close confirm poup confirmation... i am not too sure how to avoid that...
On which event I can perform the window.close() ?
It's sure that a confirmation window will be prompted.
can do this: <body onload= "window.print();window.close();">