Form Target Iframe Issue on Safari I have this code,
<form action="{{ route('paymentgateway1') }}" method="post" target="myiframe">
@CSRF
<input type="submit" value="Do Stuff!">
</form>
<iframe name="myiframe"></iframe>
This code is working fine on Firefox and Chrome. For safari, form target not reaching to iframe. it opens a new page and showing the iframe over there.
I'm trying to show the Payment form from CyberSource in laravel.
Any ideas on why this is happening and how to fix this issue
Try moving the iframe before the form
I tried that, but it same.. no luck :(
@jckn123 search for issues concerning iframes and Safari. I saw some, but wasn't sure which one if any applied to your use case.
I tried all the options i still got no luck..
@jckn123
Is paymentgateway1 on the same domain?
If not, it could be CSRF issues, but unlikely since Firefox and Chrome worked
Assuming it is not the same domain, why do you need a POST with CSRF?
I just tested a GET on Safari 12.1.2 (14607.3.9) and it worked. What is your version?
<form action="{{ route('paymentgateway1') }}" method="get" target="myiframe">
<input type="submit" value="Do Stuff!">
</form>
<iframe name="myiframe"></iframe>
Please sign in or create an account to participate in this conversation.