I integrated PayPal\'s Identity API in my webpage. As usual when user clicks login with paypal(JavaScript button) it opens a new window for login purpose. But after
Setting top.window.opener.location will update your original "opener" window. You will also need to close the dialog by calling top.close(). This is just an attempt at combining the other two answers and sharing the solution I arrived at with their help. Note that this code is in a url other than the "opener" window.