我在Lightbox iframe中有一个按钮。如何通过单击该按钮关闭该iframe?Lightbox iframe关闭
我的代码如下所示:
<p:lightBox id="posetastavkeListaLightBox"
widgetVar="posetastavkeListaLightBoxWidget"
iframe="true" width="900px" height="700px">
</p:lightBox>
我在Lightbox iframe中有一个按钮。如何通过单击该按钮关闭该iframe?Lightbox iframe关闭
我的代码如下所示:
<p:lightBox id="posetastavkeListaLightBox"
widgetVar="posetastavkeListaLightBoxWidget"
iframe="true" width="900px" height="700px">
</p:lightBox>
通过this answer到Close a lightBox primefaces from iframe Button
<p:lightBox id="light" iframe="true" width="80%" height="80%" widgetVar="dlg">
iframe
方:
<p:commandButton value="Close" onsuccess="parent.dlg.hide();" ajax="true" process="@none" />
的[关闭从iframe的按钮灯箱primefaces(
重新加载非常昂贵,我失去了一些数据。但类似的东西可以帮助 – 2013-02-11 14:23:24
我更新了答案。当前的答案不会重新加载。 – JSuar 2013-02-11 14:24:19
谢谢。这帮助了我。 – 2013-02-12 09:22:11
可能重复http://stackoverflow.com/questions/7874254/close-a-lightbox-primefaces -from-iframe-button) – Nix 2013-02-11 14:10:41