The Mac Observer

 
   
 
x y window pos javascript ie mac
Posted: 15 May 2002 06:52 AM [ Ignore ]
stars_1
Total Posts:  2
Joined  2002-05-15

i’m trying to place some pop ups regarding to the
opener window, so i need the x and y pos.

works fine in netscape on mac, win and ie on win using
following script:

if (document.all) {
y = window.screenTop;
x = window.screenLeft;
}
else if (document.layers) {
x = window.screenX;
y = window.screenY;
}

but returns undefined on ie on a mac?!
is there anything i can do about this?

Profile
 
 
Posted: 15 May 2002 07:15 AM [ Ignore ] [ # 1 ]
stars_4
Total Posts:  558
Joined  2001-12-18

You could try the code generator at the bottom of This Page .

 Signature 

I’m out of time, patience and my mind… but I have plenty of excuses.

Profile
 
 
Posted: 15 May 2002 07:37 AM [ Ignore ] [ # 2 ]
stars_1
Total Posts:  2
Joined  2002-05-15

thanks for the link.

strangely, you can position a popup dynamicaly on mac ie,
using the window top and left attributes.

i’ve done that and it works.

but if i want javascript to retrieve that information,
since i don’t know the position of the original browser window,
it will return “undefined” for the screenTop attribute
or “[window object]” for the top attribute on mac ie…

Profile
 
 
   
 
 
‹‹ DV to DVDR      Need a script that will ftp ››

Apple Stock Quote (AAPL)

Loading...

Hot Topics

TMO Express

Join the TMO Express Daily Newsletter to get the latest Mac headlines in your e-mail every weekday. Find out more!

Top Deals From DealBrothers.com

Recent Features

Support The Mac Observer

We noticed you may be running AdBlock on your computer. It takes real money to run this site and to deliver the news, tips, and opinions you love to read.

If you wish to block the ads that pay for the creation of our content, we ask that you instead support TMO Directly, either with a $5 monthly recurring contribution, or a one-time donation of any amount of your choice. Thanks!

Subscribe with Paypal Donate with Paypal