How do I change the opening page if the dialog box was opened with shoModalDialog?
Posted on 2007-10-15
If i opened a window with, window.showModalDialog, how can I tell what the name of the window is that opened the Dialog box and how do I reload the opening page with a new page, close the dialog and show the new opening page.
For example if I opened with window.open I could use window.opener.location.href; so in the same manner is there a way to reset the opening page if the page was opened with window.showModalDialog.
I have scanned the web, and so far I found that after the call to the window.showModalDialog I can add the following line of code to force the refresh of the page. This is not exactly what I asked for, but at the top of the page
I can then redirect to the page I want. The showModaldialog does not allow refresh of parent page until the Dialog box is closed.
window.location = window.location;
Let me know if you have any comments on it.