I am opening a paypal window from the parent with window.open()
. After payment and redirecting back to my page (in the popup window), I would like to close the popup and update the parent window URL.
I found out this works over window.opener.location.
However the console shows
window.opener.location is null
after redirection because as the child window changes, the popup looses the information about the opener.
Well great. Now is there any way to get around this? Maybe adding a sort of "listener" to the parent who listens to the URL of the child?
window.opener
from - is it on the same domain as the opener? I'm not sure but I think the opener property should persist across redirects – Distribute<a target="_blank">
instead ofwindow.open()
, I also needed to includerel="opener"
. – Haworth