Search code examples
asp.netjavascriptasp.net-2.0asp.net-3.5

How to refresh parent and ancestor windows after closing the child windows?


I have three windows: 1st - main window
2nd - child window - it's opened using window.showModalDialog from 1st widnow.
3rd - window - is an ancestor of 1st window and is's opened from 2nd window using window.showModalDialog.

And now what I need to achieve is to open 1, 2 and 3 window. Next after closing the 3rd one, refresh the 2nd one. And after closing the 2nd one, refresh the 1st one.

But there is one more assumption, I don't want to have any post-back during this process.

Dose anybody have any idea how to make it?


Solution

  • On the page which has child, invoke a child using function which returns value when it is closing. Depending on this value let the parent refresh itself using get method. You can achieve this by changing it's current url, for example by adding some parameter to it. That's all.