C
christine.nguyen
I'm using offset values to find the x,y position of an iframe on an
html page. The code works in all browsers except in Mac explorer 5.x.
Does anybody have any ideas how to get around this?? Thanks. My code
is below, assuming myFrame is the iframe in question, offsetLeft is the
x coordinate, offsetTop is the y coordinate. For some reason,
offsetParent for the iframe on Mac Explorer is always undefined. Even
stranger, this is only the case for iframe elements. When dealing with
other elements in Mac Explorer 5.x, the code below works fine. Just
the darned iframes are giving me a problem. Any thoughts are
appreciated! - chh
function getMyFramePosition(){
var obj = myFrame;
var offsetLeft = 0;
var offsetTop = 0;
while (obj){
offsetLeft += offsetTrail.offsetLeft;
offsetTop += offsetTrail.offsetTop;
obj = obj.offsetParent;
}
html page. The code works in all browsers except in Mac explorer 5.x.
Does anybody have any ideas how to get around this?? Thanks. My code
is below, assuming myFrame is the iframe in question, offsetLeft is the
x coordinate, offsetTop is the y coordinate. For some reason,
offsetParent for the iframe on Mac Explorer is always undefined. Even
stranger, this is only the case for iframe elements. When dealing with
other elements in Mac Explorer 5.x, the code below works fine. Just
the darned iframes are giving me a problem. Any thoughts are
appreciated! - chh
function getMyFramePosition(){
var obj = myFrame;
var offsetLeft = 0;
var offsetTop = 0;
while (obj){
offsetLeft += offsetTrail.offsetLeft;
offsetTop += offsetTrail.offsetTop;
obj = obj.offsetParent;
}