Hello stackoverflow fellas, I am facing a problem here. I gave a iframe
code to other fella to embed it on his website.
Here is the code of iframe
:
<iframe height="100%" width="100%" frameborder="0" scrolling="auto" src="http://www.mywebsite.com/iframecode" type= "text/javascript"></iframe>
The above iframe
contains following html
:
<html>
<head>
</head>
<body>
//... some html code
<iframe src="http://www.paymentgatway.com/pay" height="100%" width="100%" frameborder="0" scrolling="auto"></iframe>
//... some html code
</body>
</html>
Here above html
contains another iframe
which is used to make a payment(third party).
Problem:
So the problem is when he clicks on pay button which is in second iframe
, it opens 3D security page to new tab instead of opening it to same page.
I have tried <base target="_self"/>
in <head>
tag of my iframe html, but no luck.
I have tested using payment iframe directly, when I click pay button it opens in same window .
Please, can you change my luck?
I see two important things:
HTTP
withHTTPS
is not a good practice (unless you try to cheat someone) and even if you do, normally the secure page or the browser will block you.paymentgatway.com
has been coded properly, then it will not allow you to load inside aniframe
for security reasonSo, based on:
I will say you are facing both scenarios here.
Conclusion:
You can't unless you own both domains and can modify the source code of
paymentgatway.com
page.Did you try:
?