开发者

How to set the response of a form post action to a iframe source?

开发者 https://www.devze.com 2023-03-31 14:20 出处:网络
I have a form and an iframe. I want to set the source of the iframe on form submit to a 3rd party payment gateway url. Also, onSubmit a javascript function is called. I want to display the response of

I have a form and an iframe. I want to set the source of the iframe on form submit to a 3rd party payment gateway url. Also, onSubmit a javascript function is called. I want to display the response of the form submit within a iframe rather than in the parent window. Kindly guide me开发者_Go百科. Thanks.


<form target="frame" onsubmit="document.getElementById('frame').style.display = 'block';">
</form>

<iframe id="frame" name="frame" style="display: none;"></iframe>

I think that's all you need ;)

0

精彩评论

暂无评论...
验证码 换一张
取 消