Solved

Javascript - detect the position of the browser window

Posted on 2009-05-09
2
229 Views
Last Modified: 2012-05-06
I'm trying to get a new browser window to appear in front of the current page the user is looking at.  I know how to create the new window and how to detect the width and height of the current browser window.  But I need to be able to check the browsers position on the computer screens.

The way I have it configured now, it appears a certain distance from the top-left of the screen.  This however could pose a problem with different sized computer screens and especially when a user has dual monitors.

Is there any way to detect the browsers postion so that I can position my new window relative to the old?
0
Comment
Question by:josephdaviskcrm
2 Comments
 
LVL 5

Accepted Solution

by:
satheeshm earned 500 total points
ID: 24349142
Hi,

You can use Screen.height and Screen.Width to find the screen height and window.

Follow the below link to make you window center on the screen, irrespective of different screen sizes.

http://www.boutell.com/newfaq/creating/windowcenter.html

Thanks,
Satheesh M
0
 

Author Comment

by:josephdaviskcrm
ID: 24391149
This doesn't seem to be what I'm looking for.  Is there javascript that can tell me the distance from the top or from the left the current window is?
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you need to keep track of a simple list of numbers or strings, the Array object is your most direct tool.  As we saw in my earlier EE Article (http://www.experts-exchange.com/A_3488.html), typical array handling might look like this: (CODE) B…
Article by: DanRollins
This article describes a JavaScript program that creates a maze made of hexagonal cells.  In Part 2 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7850-Hex-Maze-Part-2.html), we'll extend the program by adding a depth-…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now