I want to direct a customer in an e-commerce site to pay via Paypal's website.
I would like the payment to be done in a new tab/window so the customer doesn't lose the current state of the web page he/she is at.
In order for the Paypal window to open without getting blocked, I am using an anchor with target="_blank". Which is working perfectly except for the fact, I can't close it after Paypal payment is done since window.close()
doesn't work for windows that were not opened via window.open()
.
How do I make it so it is BOTH not blocked as a popup AND I am able to close it with JS later on?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…