简体   繁体   English

使用Javascript / jQuery将POST重定向数据发送到顶级iframe吗?

[英]Send POST data on redirect with Javascript/jQuery to a top level iframe?

This question refers to: Send POST data on redirect with Javascript/jQuery? 该问题涉及: 使用Javascript / jQuery在重定向上发送POST数据吗?

The solution for the problem was to generate a hidden form which is then submitted to handle the POST + redirect - however I will be generating the page in an iframe and redirecting the parent frame - is this possible with javascript? 解决该问题的方法是生成一个隐藏的表单,然后将其提交以处理POST +重定向-但是我将在iframe中生成页面并重定向父框架-使用JavaScript可以吗?

edit: As is always the way came across the solution shortly after posting the question! 编辑:和往常一样,发布问题后不久就遇到了解决方案! =S = S

Set target="_top" in the iframe's form tag. 在iframe的表单代码中设置target =“ _ top”。 That tells the browser to load the response in the parent frame. 这告诉浏览器将响应加载到父框架中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM