Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

iframe Element

Status
Not open for further replies.

DaZZleD

Programmer
Oct 21, 2003
886
0
0
US
hey.


I have a document with an iframe and an element inside the iframe. I need to find the absolute coordinates of the element with respect to the document (not iframe).

how can I do this (I can get the absolute coordonates of the element inside the iframe with respect to iframe)? (please note that the document might have more than one iframe)

thank you!

--------------------------
"two wrongs don't make a right, but three lefts do" - the unknown sage
 
ok... got it.

you can do this from the element like this:
- get the coords of the element with respect to its iframe
- get the iframe coords in the parent document. to access the iframe in the parent document one can use:
window.frameElement

--------------------------
"two wrongs don't make a right, but three lefts do" - the unknown sage
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top