user3908730
user3908730

Reputation: 87

How to I calculate absolute position of individual frames inside a frameset (Javascript)

I have to support a website that still supports framesets. My use case is to find the absolute position of a frame in the frameset. I can get its width and height, but I also need its left and top coordinate. I need this to find an element's position inside the frame with respect to the main document.

Sample code can be taken from https://www.javatpoint.com/oprweb/test.jsp?filename=htmlframetag2

I just need a way to determine where the frame's computed position is.

Upvotes: 0

Views: 134

Answers (1)

user3908730
user3908730

Reputation: 87

Wasn't working probably because I was only running the script for the main window frames. Works with recursion now.

Upvotes: 0

Related Questions