Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Javascript - detect the position of the browser window

Posted on 2009-05-09
2
Medium Priority
?
234 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 2000 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

In Part 1 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7849-Hex-Maze.html) we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
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…

688 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