Hello, how can I get iframe position using JS in the current iframe?
This code works in IE
var browser = navigator.appName;
if (browser == "Microsoft Internet Explorer") {
scrollX=self.screenLeft; //works
scrollY=self.screenTop; //works strange
}
How to do it in Firefox?
screenLeft
, screenTop
- undefined
screenX
, screenY
- the position of the parent window
parent.frames[self.name].screenX
- the same result as screenX
Any idea, where is my iframe in FF? Thx.