I have a page with an iFrame embeded. Now I want to modify a object (for example a Button) outside this iFrame by clicking on a button inside the iFrame (with Javascript). How does this work? Can I just do it like usual?
Asked
Active
Viewed 38 times
0
-
the parent frame is accessible using `window.parent`, so, you should be able to do it like usual – Jaromanda X Jul 07 '15 at 10:49
-
Possible duplicate of [how to access iFrame parent page using jquery?](https://stackoverflow.com/questions/726816/how-to-access-iframe-parent-page-using-jquery) – r4phG Mar 22 '18 at 13:10
1 Answers
2
You can access the parent window using window.parent. From that point, you should be able to do it like usual.
Example : $('#yourButtonId', window.parent.document).
See also how to access iFrame parent page using jquery? as the question has already been asked