I have a webpage that processes payments using PayPal.
Once the customer has chosen the product they want, they fill in their personal details and when they click the buy button, they are supposed to be redirected to the PayPal website to log in and process the payment.
Since my website is iframe based, I need the PayPal login page to open in a new window, as PayPal does not allow their pages to be viewed in iframes.
My problem is that the redirection works fine with IE9, but strangely with none of the other browsers I have tested it with (FireFox, Opera and Safari). These don't open a new window and generate an error saying that the current content cannot be viewed in an iframe.
Below is the code for the redirection:
sb.Append("
Does anyone know why it does not work with browsers other than IE9?
Thank you.
Cyrille ReyPosted Apr 2, 2012, 10:41 AM
Thank you for your reply.
Could you show me how I can integrate a window.open() in this line of code: sb.Append("
This is where the new window operation needs to happen.
Thank you.
SenthilkumarPosted Apr 2, 2012, 10:13 AM
I think the problem is paypal has secure http and it may be different format to display in iframe.
If you want to open the paypal page as separate window then you can use the
window.open("url");
If you want to redirect with in the iframe then
window.location.href="url";
If you want to redirect in your parent page url then,
window.top.location.href="url";