Access parent window from modalDialog

August 15, 2008 · Posted in general web, javascript 

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();

Comments

Leave a Reply