cschmid
asked on
Automatic Print
I need make a function in JavaScript that automatic print in a specific printer and in a specific tray...
Do you know an object that permit do this?
Thanks
Do you know an object that permit do this?
Thanks
window.print() is all you have to do to start the print.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
But let me note that it will only work in IE5+ and it will still prompt for confirmation. You should be very happy that clients do not support automatic printing, as it would be a disaster if people could force pages to print when you visited their page.
You can use an activex control if you need to force a print, or if its in an intranet situation you could use server-side code (asp....) to have the server initiate a print to a specific printer.
--KG
You can use an activex control if you need to force a print, or if its in an intranet situation you could use server-side code (asp....) to have the server initiate a print to a specific printer.
--KG
If it's for use on an Intranet (and that's the only scenario I can imagine it being useful), I'd build a server-side DLL using VB, which will print to a given printer and tray, then call it with form data and ASP. This could be triggered with Javascript if you really wanted...