Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
50
rated 0 times [  51] [ 1]  / answers: 1 / hits: 20755  / 13 Years ago, fri, august 19, 2011, 12:00:00

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?


More From » window.open

 Answers
11

window.opener is removed whenever you navigate to a different host (for security reasons), there is no way around it. The only option should be doing the payment in a frame if it is possible. The top document needs to stay on the same host.


[#90532] Wednesday, August 17, 2011, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
kevenjeffreyr

Total Points: 286
Total Questions: 112
Total Answers: 95

Location: Zambia
Member since Thu, Jun 25, 2020
4 Years ago
;