Opening and printing pop-up windows

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
lovasco
Forum Newbie
Posts: 15
Joined: Fri May 17, 2002 4:25 am
Location: Milan - Italy

Opening and printing pop-up windows

Post by lovasco »

dear folks,
i have 2 questions:

1. when opening a new window (window.open), is it possible to have it automatically maximized ? the width attribute accepts a fixed amount of pixels only and we may have displays with different resolutions (800 or 1024).

2. when printing a web page (window.print), the printer selection window is displayed. Is it possible to skip this interaction and have the page be automatically printed without operator's intervention, same as pressing the printer icon on the toolbar of IE ? I have a php application that may build several reports at the same time and i would like to have them printed automatically without having to press the OK button for each one.

thanks in advance,
luca
User avatar
mydimension
Moderator
Posts: 531
Joined: Tue Apr 23, 2002 6:00 pm
Location: Lowell, MA USA
Contact:

Post by mydimension »

1) while im not sure, i think you can detect a users desktop dimensions and then just send that to your pop up function

2)no, because it could be mis-constude as an attack so that functionality as been completely disabled from javascript. you need interaction.
User avatar
nielsene
DevNet Resident
Posts: 1834
Joined: Fri Aug 16, 2002 8:57 am
Location: Watertown, MA

Post by nielsene »

However you might be able to make your reports into a single document so that they only have click ok once....
lovasco
Forum Newbie
Posts: 15
Joined: Fri May 17, 2002 4:25 am
Location: Milan - Italy

Post by lovasco »

I found a way to open a new window in fullscreen mode. Just code:

window.open("pagename.html","","fullscreen");

The only limitation is that we need a window.close button or type Alt-F4 to close the window.

Thanks a lot.
Luca
Post Reply