我在Lightbox iframe中有一个按钮。如何通过点击该按钮关闭该iframe?
我的代码如下所示:
<p:lightBox id="posetastavkeListaLightBox"
widgetVar="posetastavkeListaLightBoxWidget"
iframe="true" width="900px" height="700px">
</p:lightBox>
答案 0 :(得分:1)
通过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" />