简体   繁体   English

模态为第三方iFrame时如何关闭模态

[英]How to close a modal when modal is 3rd party iFrame

I have a need to launch a third party site as a pop-up iFrame. 我需要启动第三方网站作为弹出式iFrame。 When the buttons are selected in the iFrame (Save, Cancel), the iFrame is not closing. 在iFrame中选择按钮(保存,取消)后,iFrame不会关闭。 I'm using JavaScript to open it ( .modal('show'); ), but can't seem to execute a .modal('hide') on it. 我正在使用JavaScript打开它( .modal('show'); ),但似乎无法对其执行.modal('hide')

I was looking up event listeners to see if that was feasible. 我正在查找事件侦听器,以查看是否可行。 However, it appears I need the form id which I currently don't have and I'm not sure the 3rd party can/would provide, or even if that is a viable solution due to security reasons. 但是,看来我需要我目前没有的表单ID,并且我不确定第三方是否可以/将不会提供该表单ID,或者即使出于安全原因这是可行的解决方案。

Ok. 好。 I found out I needed cooperation from the owner of the third party site. 我发现我需要第三方站点所有者的合作。 The header tags they were using did not allow for the page to be set as an iFrame. 他们使用的标头标记不允许将页面设置为iFrame。 Once they removed the restriction it began to work. 一旦他们消除了限制,它便开始起作用。

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

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