asp.net page loading in window popup; redirecting to main window with a different url
Hi,
Can anyone please help me with your inputs to accomplish this task.
Scenario; I opened a asp.net page in popup window; that page has close button; modify button;
When the close and browser close the parent window should be refreshed --> for this I am using window.opener.XXXfunction on window.onunload event.
When modify button is clicked it should redirect to some new page and after doing some steps it should close the window and a new page should be loaded in parent window.
Problem I am facing now;
When modify button is clicked I am redirecting to new page at this instance window.onunload is firing and the main window is getting refreshed;
Q1:IS there any other method to handle other than window.onunload during browser close?
Q2: How to close and the popup window and redirect to a new page in main window?
Please share your ideas. Thank you
Re: asp.net page loading in window popup; redirecting to main window with a different
If you can get the instance of the popup, then you can use popup.exit :)
Upto my knowledge there is no method like onunload. But I saw somebody selling similar code at codeclerks. I don't know how did he achieved it, but it is definitely not straight forward :)