Access parent window from modalDialog

When you call showModalDialog() you need to pass “self”, without the quotes, as the second argument.

You can then access the parent(opener) with:
var opener = window.dialogArguments;

You can then access any function declared in parent window with:
opener.myFunction();

Leave a Reply

Your email address will not be published. Required fields are marked *

*

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