you need to calc it.
function posY(obj){
var curtop = 0;
if (document.getElementById || document.all) {
while (obj.offsetParent) {
curtop += obj.offsetTop;
if (typeof(obj.scrollTop) == 'number')
curtop -= obj.scrollTop;
obj = obj.offsetParent;
}
}
else if (document.layers)
curtop += obj.y;
return curtop;
}
function posX = function(obj) {
var curleft = 0;
if (document.getElementById || document.all) {
while (obj.offsetParent) {
curleft += obj.offsetLeft
obj = obj.offsetParent;
}
}
else if (document.layers)
curleft += obj.x;
return curleft;
}
feel free to remove netscape 4 support.
-- bruce (sqlwork.com)
"Charleees" <vc********@gmail.com> wrote in message
news:11*********************@g10g2000cwb.googlegro ups.com...
hi all,
I have a javascript to display popup window...
i need to dispaly that in the popup on button click and just beleow
the
button...
if i give some default coordinates for the popup, it works fine on the
resolution i set, but mislocates on the others locations..
is there any way to solve this problem... or is it possible to find the
screen cordinates.. so that i could locate the pop up just beleow the
button on all resolutions...
how can i solve this?
please reply as early as possible....
Charles