Solved

Javascript - detect the position of the browser window

Posted on 2009-05-09
2
228 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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Suggested Solutions

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
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'…
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…

759 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

20 Experts available now in Live!

Get 1:1 Help Now