Hi.. i have a printer with A4 size paper in tray 3 and A5 sized paper in Tray 2.. now i want to select printer tray from javascript while printing so that specific pages are printed in A4 and A5.
Can anybody suggect me how do i do this in javascript. I am using media print in html to print the content of div...
Jeanne - I think you are understating this. I believe that the browser's sandbox should block any access attempts to any hardware.
Ruquia - this may be frustrating for you, but imagine this from a blackhat perspective. There are websites you can go to know that pop up lots of annoying (to say the least) web pages. Or do pop-under sites. Now imagine how much more frustrating it would be if you were to go to a web page and suddenly find that your company's printer is printing thousands of pages of advertisements. Or that the page had told to your printer to reconfigure itself in some way that the printer did not understand, and your printer is no longer working.
So - no access to the printer from within Javascript.
Andrew Monkhouse wrote:Jeanne - I think you are understating this. I believe that the browser's sandbox should block any access attempts to any hardware.
Yes. I was trying to subtly hint that it wasn't possible with JavaScript. The browser absolutely prevents this.
It might be possible with ActiveX, but that's only in IE and only if the user allows ActiveX to run.
As said by jeanne that its possible in Active X... can anybody give me an example of ActiveX.. when user clicks print button the page should get printed to a particular tray like Tray2.
Lester Burnham
Rancher
Joined: Oct 14, 2008
Posts: 1337
posted
0
ActiveX ... can you afford to exclude everyone who is not running one particular browser on one particular operating systems AND whose security level is set low enough to allow this? While it may be possible, it won't work for many people.
As this is a small application just used in my office alone.. i need to any how show the result to my boss.. can you please suggest me an example of Active X