Wrox Programmer Forums
|
Javascript How-To Ask your "How do I do this with Javascript?" questions here.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 17th, 2005, 10:22 AM
Registered User
 
Join Date: Feb 2005
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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.






Similar Threads
Thread Thread Starter Forum Replies Last Post
Press Print Screen Key Using JavaScript sundar53 .NET Framework 2.0 0 November 4th, 2007 08:48 AM
JavaScript detect screen resolution crmpicco Javascript How-To 1 September 19th, 2005 06:07 AM
dual use of the + symbol Martyn JSP Basics 0 February 19th, 2004 07:35 AM
Dual Screens Louisa Beginning VB 6 1 November 9th, 2003 05:44 PM





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