我正在实施3D安全。它需要在iframe内自动提交表单,以便响应可以在所述iframe中显示银行用户名/密码框。
<form id="3D_form" target="3D_iframe" action="<?php echo $acsurl; ?>" method="post">
<input type="hidden" name="PaReq" value="<?php echo $pareq; ?>" />
<input type="hidden" name="MD" value="<?php echo $md; ?>" />
<input type="hidden" name="TermUrl" value="<?php echo $termurl; ?>" />
</form>
<iframe name="3D_iframe" width="100%" height="400" frameborder="0" src="<?php echo $acsurl; ?>"></iframe>
用户输入用户名/密码后,会将成功代码发布到我也提供给原始iframe帖子(TermUrl)的网址。
问题是,TermUrl在iframe中使用我的网站主题/模板呈现一个页面,所以如果有意义,我会在页面中找到一个页面吗?
我正在使用Joomla。我的TermUrl是控制器中的一个函数,如:
http://www.mywebsite.com/index.php?option=com_mycontroller&task=mycontroller.callback
我知道如何在iframe中呈现BLANK网页,或者更好的是,只需重新渲染整个页面而不使用iframe ......?目前我必须使用我的回调函数中的Javascript重新加载页面:
function callback() {
echo "<!DOCTYPE html>";
echo "<head>";
echo "<title>Form submitted</title>";
echo "<script type='text/javascript'>window.parent.location = 'http://mywebsite.com/index.php?option=com_mycontroller&view=myview'</script>";
echo "</head>";
echo "<body></body></html>";
}
答案 0 :(得分:0)
在控制器的功能末尾添加die;
。
我想这会有用,不会打开iframe和iframe