Sunday, 29 September 2013

How to open IE popup to secondary screen, in FULLSCREEN mode

How to open IE popup to secondary screen, in FULLSCREEN mode

I need to implement the following feature and make it work in Internet
Explorer:
Use clicks a link in the primary screen.
A popup will be opened in the secondary screen and in fullscreen mode.
Some requirements:
It must to work in IE8 (and 9/10)
For simplicity, we can assume that the secondary screen is located right
from the primary screen. Also, the resolution of the secondary screen is
known.
Javascript is used, but VBScript would be also possible.
So far the prototype is working quite well
the popup is opened with window.open with left=screen.availWidth+1 -> will
be opened in the secondary screen OK
the fullscreen mode is activated with Wscript.Shell sendKeys({F11}) trick.
This has some random issues. Timing etc will make it fail sometimes.
There are couple of IE-specific problems that make the implementation much
more difficult
screen.availWidth returns always the primary screen resolution. E.g.
Firefox returns the right size for popups located in secondary screen.
Otherwise I could mimic the fullscreen mode by positioning the popup to
fill the secondary screen completely.
window.open() with "fullscreen=1" works too but it opens the popup ALWAYS
in primary screen. No matter if I use timers to make it target to
secondary screen. Also a temporary popup located in secondary screen does
not help. Looks like the fs=1 will open the window always in the screen
that the click has been started originally from.
And for clarity, this will be implemented for an intranet application and
has valid and well justified reasons. There is no point to suggest to try
another web browser.
Any ideas that has been proven to work are welcome!

No comments:

Post a Comment