It's possible to modify the variables of a parent window from a modal dialog. The key is to pass in "window.self" as the second parameter to showModalDialog:
In the parent:
Code:
parentVar = "set by parent";
vRv = window.showModalDialog("modalWindow.html",window.self, "");
In the modal:
Code:
dialogArguments.parentVar = "set by modal";
This allows you to change multiple variables in the parent, in case just the return value of the modal isn't enough.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.