Reputation: 3691
How could I pass a value to a function on a parent page?
Would it be something similar to this?
parent.functionname("VALUE")
Upvotes: 1
Views: 114
Reputation: 888283
Yes.
As long as both pages are in the same domain, you can access the global scope (window
object) of the parent frame using the frame's parent
object.
You can use any global data (functions or variables) by writing parent.whatever
.
Upvotes: 2