p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Javascript How-To (http://p2p.wrox.com/forumdisplay.php?f=87)
-   -   Javascript and dual-screen? (http://p2p.wrox.com/showthread.php?t=26985)

gray March 17th, 2005 10:22 AM

Javascript and dual-screen?
 
Is there anyway to make Javascript 'see' the combined resolution on a dual screen setup? I am trying to make an IE window appear full-screen on the second monitor.

Using screen.availWidth only returns the horizontal resolution of the primary monitor. It is fairly easy to half solve the problem by doing something like self.moveTo(screen.availWidth+1, 0), this moves the window to the second monitor. However, my user base is a mixture of single and dual-screen setups, doing the above under a single screen setup results in the window moving off-screen.

If javascript could 'see' the combined resolution I could do something like this.

var size = screen.availWidth * 0.5;
self.resizeTo(size, screen.availHeight);
self.moveTo(screen.availWidth-size, 0);

Any ideas? TIA.



All times are GMT -4. The time now is 03:32 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.