hi,
Ich bekomme allerdings nicht raus, wie ich mit JavaScript unter IE die absolute Position eines Bildes bestimmen kann.
muehsam - denn Du musst die Hirarchie der Parent-Elemente durchlaufen, und die Offsets addieren. Solches sollte helfen (nicht geeignet fuer absolute Positionierung):
function findPos(el) {
var xPos = 0;
var yPos = 0;
if(document.layers) {
xPos = el.x;
yPos = el.y;
}
else {
while(el){
xPos += el.offsetLeft;
yPos += el.offsetTop;
el = el.offsetParent;
}
}
return {xPos: xPos, yPos: yPos};
}
zu rufen wie folgt:
var imgX = findPos(document.BILDNAHME).xPos;
hth + Gruss Joachim