Asp.net with javascript page refresh

ajaxasp.net

I have an ASP.Net appl composed by three pages; page1, page2 and page3
The execution starts on page one. Page1 calls Page2, but page1 has to be visible still, so user can still work on that page. When Page2 closes, a java script function calls Page3, so all the cleaning is done on page 3. When page 3 completes its task, the window goes, and only Page1 is displayed
To call page3 from page two I use something like this;

xHRObject.open("GET", "Default3.aspx?SiEditor=E&idSec=N&F="+idenValue, false); 

The problem is the following:
the info updated on page 2, has to be updated on page1, but it does not. If I place I similar java script on page3 to call page1, it instantiates a new page, rather than refreshing the current one. How do I access page1? If we use modal forms for page2, the control goes back to page1 with no problems, but I can not use modals in this case

Any idea how to refresh page1 when page2 and 3 are disposed?

Best Answer

When you create new windows you can access the window that opened them via the opener property. You can then use the location object to reload the page.

So this could be the body tag on your page 2:

<body onunload="window.opener.location.reload([true])">
Related Topic