I have a Page (Shopping Cart), in that page there is box showing cart items and prices. And also the same page contains one link which is pointing to completely different site(different context).
When the user clicks on that link, one popup window opens and going to that site. Once the user fills the form and submits, it goes to DB and updates the record and finally after we get the confirmation page on the popup, there is a close button on the popup which indicates to close that page.
Generally once we close the popup window it supposed to update the cart items and price, but it doesn't. When we refresh the page, the items are grabing from DB and displaying updated data.
Suppose if the popup window is with in the application, then we can refresh the page easily, but in this case its bit difficult to update page since pop is different site.
If you do not have control over the code in the external window (like opening a external site in the popup), then you can poll for the status of the popup window and do a self refresh when the popup window is closed.
From main window start a polling routine using setTimeout when the popup is opened, that checks for the popup window's state. If the popup window handle is closed or null then clear the timeout and perform the refresh.