Have a frame trigger a function in its parent

I have an HTML frame that I created by running window.open('/a-new-page/', 'my-second-frame'); in the parent page.

When a button is clicked in the frame, I want to trigger a function on the parent page. (In my particular situation, the function updates some of the parent frames HTML)

What is the simplest way to do this?

Both the parent and the frame have the same domain.

Source: html5

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.