1

How could I pass a value to a function on a parent page?

Would it be something similar to this?

parent.functionname("VALUE") 
1
  • this is executing in an iframe Commented Jun 21, 2011 at 2:45

1 Answer 1

2

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.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.