473,666 Members | 2,096 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

x, y coordinates of the browser top left corner in Interenet Explorer.

Sorry if this has been asked before. I've searched the group and the
FAQ and didn't find the answer.

How can I retrieve x, y coordinates of the browser top left corner in
Internet Explorer?

In Firefox screenX/screenY are working as expected.

In IE, from MSDN :
screenLeft Retrieves the x-coordinate of the upper left-hand corner of
the browser's client area, relative to the upper left-hand corner of
the screen.

screenTop Retrieves the y-coordinate of the top corner of the
browser's client area, relative to the top corner of the screen.

So, screenTop will include titlebar height as well. Using that in
window.open will shift the window down.

May 4 '07 #1
1 4127
One possibility (from http://www.webmasterworld.com/javascript/3236180.htm)
is to do something like this:

if(self.innerHe ight){
hdiff = self.screen.ava ilHeight - self.innerHeigh t;
wdiff = self.screen.ava ilWidth - self.innerWidth ;
} else {
hdiff = self.screen.ava ilHeight -
document.docume ntElement.offse tHeight;
wdiff = self.screen.ava ilWidth -
document.docume ntElement.offse tWidth;
}

and then to adjust screenLeft/screenTop when creating a popup.
May 4 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

34
2659
by: Marian Aldenhövel | last post by:
Hi, I am in the process of embarking on building a large web application. I wanted to seize that opportunity to learn how to use CSS and get rid of my ad-hoc approach to HTML-coding (i.e.: add tables until either the result is OK or I decide to start over). However I do not seem to be able to get it right. Experimentation is beginning to wear me out...
0
1733
by: Byron | last post by:
HI- I have a problem while resizing a Window to make a transparent overlay. Using a control looks terrible due to flicker, but you can use a borderless form with the transparency setting that doesn't accept focus. When you click and drag, the bounds of the form are updated. Moving the mouse from the top left of the screen towards the bottom right looks great. But when you move from the bottom right to the top left
15
7047
by: Tony Gahlinger | last post by:
I'm using my browser (Mozilla/5.0 Linux i686 Gecko/20031007 Firebird/0.7) to do some client-side image processing. I want to capture the sequence of coordinates a user clicks on in xxx.jpg in the following html <a href="#"><IMG SRC="xxx.jpg" ISMAP></a> and save these to a file for later handling. The coordinates appear on the bottom left of the window as I move the mouse, so I know they're being passed around somehow, but I haven't...
7
3837
by: Herbert VON GRÜNENWALD | last post by:
Hi everyone ! I would like to set an ListViewItem at a special position, into a ListView. There is Bounds, but it's a propertie, that can be only get ! I would like to place the item at a special coordinates, not at a special index. like:
4
3668
by: K.N.Ranjit | last post by:
Hi to all friends out there, I'm facing this problem for atleast 2 days but still have'nt yet solved my problem.I send the mail few days back (ie) in VB.net how to shift my form coordinates (ie) by default (0,0) is in the top-left corner of the form but right now I need it in the bottom left corner of my form (ie) my (0,0) coordinates.I dont know coding.I tried changing the form property location but this location property is to place...
9
4212
by: pcnerd | last post by:
I created a demo program with a status bar & status bar label on the form. When the program runs, it's maximized. When I move the mouse over the form, I can see the X & Y coordinates changing on the status bar label. Here's the problem. I have a 19" LCD monitor with a resolution of 1280 by 1024. When the program runs & the mouse is in the upper-left corner, the X & Y coordinates are 0,0. When the mouse is in the lower-right corner, the X &...
3
21255
by: jackiepatti | last post by:
QUESTION: I have a web page containing a form that contains an image instead of a submit button, e.g. <form name='myform' action='get' method='otherpage.asp'> <input type='image' src='picture.gif' name='myimage' id='myimage'> </form> When forms with image types are submitted, the value is not returned; instead, when the form is submitted, the XY coordinates of the where the user clicked on the image are sent. For example, if the user
1
2307
by: Cainnech | last post by:
Hi all, I've got a bit of a challenge. I've got a script which displays the mouse coodinates if you click on an image. Now I would like to convert these coordinates to pixelnumber. Let me see if I can make it easier. Suppose we have an image which is 100px high and 100px wide. The coordinates of the upper left corner would be x=0 and y=0 The coordinates of the upper right corner would be x=99 and y=0 The coordinates of the lower left...
2
2546
by: laredotornado | last post by:
Hi, I'm using php 4.4.4. Maybe I'm misreading the docs, but in the imagettfbbox manual (http://us2.php.net/imagettfbbox), it says that text coordinates are the same regardless of what the angle is. But I am getting two distinct sets of coordinates if I change the angle from zero to 270. Here's the relevant code:
0
8356
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8871
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8783
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8552
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7387
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4198
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2773
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2011
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1776
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.