[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Automatic Print

Posted on 2005-04-27
5
Medium Priority
?
315 Views
Last Modified: 2008-03-10
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
0
Comment
Question by:cschmid
  • 2
4 Comments
 
LVL 5

Expert Comment

by:KeirGordon
ID: 13880221
window.print() is all you have to do to start the print.
0
 
LVL 53

Accepted Solution

by:
COBOLdinosaur earned 1500 total points
ID: 13880243
You cannot do it with javascript.  It requires activex such as: http://www.meadroid.com/scriptx/index.asp

Okay on an intranet but not rocommended for use on a public website.  IE only.

Cd&
0
 
LVL 5

Expert Comment

by:KeirGordon
ID: 13880269
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
0
 
LVL 4

Expert Comment

by:Fuzzyfish1000
ID: 13887219
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...
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Most of the sites are being standardized with W3C Web Standards. W3C provides lot of web standard services to the web. They have the web specification, process and documentation for all the web standards. You can apply HTML, CSS and Accessibility st…
JavaScript has plenty of pieces of code people often just copy/paste from somewhere but never quite fully understand. Self-Executing functions are just one good example that I'll try to demystify here.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question