Solved

Javascript - detect the position of the browser window

Posted on 2009-05-09
2
232 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

Avoid defining the variables in the global scope; trying to define them in a local function scope. Because:   • Look-up is performed every time a variable is accessed.   • Variables are resolved backwards from most specific to least specific scope…
This article discusses how to create an extensible mechanism for linked drop downs.
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…

752 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